Home > Article > Web Front-end > How to understand the semantics of HTML structure
When
is removed or the style is lost, the page can present a clear structure:
html itself has no performance. We see that for example
Screen readers (if the visitor is visually impaired) will "read" your page based entirely on your markup.
For example, if you use semantic markup, the screen reader will "spell out" your word one by one, instead of trying to pronounce it completely.
PDAs, mobile phones and other devices may not be able to Render the web page the same as a regular computer browser (usually because these devices have weak support for CSS)Using semantic markup can ensure that these devices render the web page in a meaningful way.Ideally, the task of the viewing device is to render the web page in compliance with the conditions of the device itself.
Semantic tags provide the device with the relevant information it needs , saving you the trouble yourself Consider all possible display situations (including existing or new devices in the future). For example, a mobile phone may choose to display a section of text labeled with a title in bold. A handheld computer may display it in a larger font. Either way once you mark the text as a title, you can be confident that the reading device will display the page appropriately on its own terms.
Search engine crawlers also rely on markup to Determine the context and weight of individual keywords
In the past you may not have considered that search engine crawlers are also "visitors" to your website, but now they are actually extremely valuable Users. Without them, search engines will not be able to index your website, and it will be difficult for ordinary users to visit.
It is very important whether your page is easy for crawlers to understand, because crawlers are very Will largely ignore the markup used for presentation, and only focus on semantic markup.
Therefore, if the title of the page file is tagged instead, then this page will be positioned in the search results It may be relatively late. In addition to improving ease of use, semantic markup is conducive to the correct use of CSS and JavaScript, because it itself provides many "hooks" to apply the style and behavior of the page.SEO is mainly about Rely on the content of your website and external links.
Facilitates team development and maintenance
W3C has set a very good standard for us. Everyone in the team follows this standard, which can reduce many differences. , facilitate development and maintenance, improve development efficiency, and even
achieve modular development.
The above is the detailed content of How to understand the semantics of HTML structure. For more information, please follow other related articles on the PHP Chinese website!