Home > Web Front-end > HTML Tutorial > How to understand the semantics of HTML structure

How to understand the semantics of HTML structure

迷茫
Release: 2017-03-25 16:40:39
Original
1149 people have browsed it

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

is bold and the font size is 2em, bold; is bold. Don’t think this is the performance of HTML. In fact, the default CSS style of HTML is working, so when it is removed or the style is lost, the page can present a clear structure and is not semantic. The advantages of the HTML structure, but browsers have default styles. The purpose of the default style is to better express the semantics of html. It can be said that the browser's default style and the semantic HTML structure are inseparable.

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template