Relevant interview questions will continue to be added, you can also leave a message in the comment section if you find that there is no interview question in the article. The topic is not the key, but the knowledge point is the most important, understanding and application is the key.

How to understand HTML semantics

  • Increase code readability, make it easier for people to understand the code, and facilitate team development and maintenance
  • It’s better for SEO, makes search engines easier to read, and helps crawlers grab more valid information: crawlers rely on tags to determine context and the weight of individual keywords
  • Easy parsing by other devices (such as screen readers, blind readers, mobile devices)

What semantic tags have been added to HTML5?

Header, footer, hgroup, nav, aside, article, address, audio, video, etc. H5 Details

The way<label>Usage of labels

Label The label is used to facilitate mouse clicking, expand the range that can be clicked, and enhance user experience

Block elements and inline elements

  • Block elements: display: Block /table Includes div, H1-H7, ul, OL, P, and table
  • Inline elements: display:inline/inline-block span, img, input, button, etc