Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the HTML5 interview questions?

2025-04-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what are the HTML5 interview questions". In the daily operation, I believe many people have doubts about the HTML5 interview questions. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the questions of "what are the HTML5 interview questions?" Next, please follow the editor to study!

1. The understanding of HTML semantics?

Answer: HTML semantics is to make the content of the page structured, easy for browsers, search engines to parse; without style CSS, it is also displayed in a document format, and is easy to read; search engine crawlers rely on tags to determine the context and the weight of each keyword, which is good for SEO; to make it easier for people who read the source code to block the site, which is easy to read and maintain.

2. How to achieve the transparency of the parent element without affecting the transparency of the child element?

Answer: method 1: use rgba

Method 2: add a layer of div at the same level as the parent element to load the child element, and locate the original location of the child element

3. Understanding and understanding of web standard and W3C

Answer: the web standard is to implement the structure, performance and behavior of the page independently. W3C puts forward standardized requirements for tagging.

Requirements for structure: (tag specification can improve the efficiency of page crawling by search engines, which is very helpful to SEO)

Label letters should be lowercase; labels should be closed; labels are not allowed to be nested at will

Requirements for css and js:

Try to use outreach css style sheets and js scripts to separate structure, performance and behavior, and at the same time improve page rendering speed and user experience

Style uses less interline stylesheets as much as possible, so that structure and performance are separated. The id and class naming of tags should be literal. The fewer tags, the faster loading, the higher user experience, easier code maintenance, and easier revision.

No need to change the content of the page, you can provide a printed version without the need to copy the content, improving the ease of use of the website

4. The difference between display none visibility hidden?

Answer: display:none disappears completely and does not occupy space in the document stream, and the browser will not parse the element; visibility:hidden disappears visually, which can be understood as the effect of zero transparency, and occupies space in the document stream, and the browser will parse the element

The performance of using visibility:hidden is better than that of display:none. When display:none switches and displays, visibility, the page generates reflux (when some elements in the page need to be changed in size, layout, display, hiding, etc., and the page is rebuilt, it is called reflux. All pages need to generate a reflow when they are loaded for the first time), while the visibility switch does not cause reflux when it is displayed or not.

5. The difference between Px, em and rem

Answer: similarities: px, em and rem are all units of length

Similarities and differences: the value of px is fixed, and it is easy to calculate as much as you specify. The value of em is not fixed, and em inherits the font size of the parent element. Rem is calculated based on the font size of the tag HTML

The default font height for browsers is 16px. So all unadjusted browsers match: 1em=1rem=16p

So 12px=0.75em=0.75rem 10px=0.625em=0.625rem.

At this point, the study of "what are the HTML5 interview questions" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report