Home >Web Front-end >HTML Tutorial >What are the benefits of semantic HTML structure for layout?
In this chapter, we will talk to you about the benefits of semantic HTML structure for layout? The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference.
1:
1. Semantic tags are just HTML, and CSS does not have semantics. HTML is tags and CSS is attributes.
2. Semantic tag resume is based on the documented page. The web page is regarded as a document. The D (document) in the DOM and the document used in writing js have already told us very clearly. , the computer treats the page as a document, and we can also classify the page as a type of document.
3. The HTML tag itself is meaningful. Such as p---paragraph, li---list, img---image, but some are unsemantic, such as div---division, which cannot represent the attributes and presentation styles of the content in the div tag.
4. Based on HTML5, HTML5 adds semantic tags
such as
5. My personal understanding is that HTML is XML with well-defined attributes. Semantic HTML can make the page structure clearer, write less CSS and JS, and be more Conducive to SEO.
Two:
Search engine crawlers also rely on tags to determine the context and weight of each keyword.
You may not have considered search engines in the past The crawlers are also "visitors" to the website, but now they are actually extremely valuable users. Without them, search engines will not be able to index your website, and then it will be difficult for general users to come and visit.
你It is very important whether the page is easy to understand for crawlers, because crawlers will largely ignore the markup used for presentation and only focus on semantic markup.
So, if the title of the page file is tagged instead of, then This page may be lower in the search results.
The above is the detailed content of What are the benefits of semantic HTML structure for layout?. For more information, please follow other related articles on the PHP Chinese website!