View XHTML tag Semantics

Source: Internet
Author: User

I attended a WD training organized by the company two days ago. One Class talked about tag semantics. After listening, I felt very useful and corrected my previous incorrect views on HTML and CSS.

First, we can use visual Division to determine the meaning of the content. What the search engine can see isCode. The search engine can only use tags to determine the meaning of the content. I have never paid much attention to search engines before, and now I am very concerned about it, because a large part of the page traffic comes from search engines. To make the pages as friendly as possible to search engines, so we need to make tags semantic as much as possible.

In the past, with my superficial understanding of web development, I thought that to write a good page that complies with the standard, I only need to separate the structure and performance, and then do not use labels such as table and font, I don't think there is any problem even though it is Div, because CSS is very powerful. However, all tags have their own semantics. The following describes the semantics of some tags:

Div semantics: Division (separated)

SPAN semantics: Span (range)

Ol Syntax: ordered list (sort List)

Ul Syntax: unordered list (unordered list)

Li Syntax: list item (list item)

............

If you ignore the label semantics and default style, all labels use Div, but you can also write a page with good visual effects, as long as you use CSS flexibly. However, even though the visual requirements are met, the entire page does not have any semantics and the search engine still cannot understand it. Therefore, remember:

Structure (HTML) is the focus, and style (CSS) is used to modify the structure. Therefore, you must first determine the HTML, tag, and then select the appropriate CSS.

Generally, all labels have a default style. Therefore, a simple way to determine whether the webpage tag semantics is good is to remove the style and check whether the webpage structure is organized and orderly, whether it still has good readability.

In addition, it is worth mentioning that the H tag is the title, and the search engine is sensitive to this tag, especially H1, and H2. For a page with good semantics, the H tag should be finished and ordered without faults. That is to say, we need to push down H1, H2, H3, H4 like this. Do not use H1, H3, H4, or Miss H2. For a well-structured webpage, the H tag can organize a major outline of the webpage.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.