Common XHTML tags for easily confusing locations correct usage

Source: Internet
Author: User
Tags relative

Just contact Xhtml+css Design Web page, a lot of friends for the use of the label no experience, also very casual, often think of what to use, think as long as the effect can be achieved. However, with the depth of learning and knowledge of search engine optimization, it is found that the use of XHTML tags is also a learning.

Here are some beginners commonly used, more easily confuse the use of the location of the XHTML tag correct use, please pay attention to the Web page pottery, welcome to discuss. Here do not each of the tags in the CSS corresponding properties and usage do a detailed introduction, focusing on the application of the Web page, I hope to help you some.

First, DIV

Div for XHTML site friends should not be unfamiliar, a lot of websites and materials also called Web Standard website construction for DIV+CSS website. This is not unreasonable, because the consortium does not recommend the table tag applied to the layout of the page, and as a layout tag div naturally assume the task of layout.

Div can also be said to be a large container. In addition to the overall layout of the Web page, it is recommended to be used to classify areas that appear relatively independent in the Web page. Like a newspaper, the role of Div is to divide a large container of different content. In different areas, according to the specific circumstances to choose the appropriate label.

Two, H label

The H tag is a title tag that is commonly used before a paragraph to indicate what the paragraph is meant to say. According to the display and to express the meaning of the level can be divided into h1~h6.

H1 is the most important, often used to express the role and nature of the entire Web site description, or to represent the site of the audience. Other labels are used to display the name of a particular zone, or the approximate description of a paragraph of text, depending on the level of the difference.

Because it represents a general description of the site or a paragraph of text, the H tag is of high value relative to the search engine. But that doesn't mean you can use it at will. For example, some websites use h tags to show keywords in a paragraph in order to deliberately pursue a particular keyword ranking. Or simply put the H tag as a container to the page layout. This completely confuses the function of the H tag and is not recommended.

Third, P

P is a paragraph label that distinguishes between different paragraphs of a group of text. For search engines, the text in the first P tag is also of high value in terms of its crawl order. Like Baidu, it simply ignores the text in the META tag description (description) and crawls the contents of the first P tag (not absolute).

Some sites in order to enable search engines can crawl more content, but also enable users to have a browsing experience, in the segmentation of the time to use

Label. This is not to say that it is not possible, sometimes not to achieve the desired effect. For documents of strict type (Strict),

is a label that is a form of expression and is not allowed to be used.

Although most Web sites use a transitional type of document, I do not recommend using text segmentation.

Four, UL and Li label

This is an unordered list, the UL tag is the statement on the list, and Li is the list item. Because of the relative independence of its projects, it is often used in places such as navigation, news or a list of articles. UL can also be used as a container to differentiate between the different lists.

Some Web sites can pursue "web standards", the table to the use of UL and Li to performance, which makes the Web page difficult to read and maintain, the wrong understanding of the Web standard is exactly contrary to the concept conveyed to us.

Five, Table

Here is not too much to introduce the use of table, just want to say, the Web Standard is not to say that the table can not be used, but it is not recommended to use table layout, only when displaying data. So it doesn't contradict the use of Web pages and table labels.

Vi. Tags for search engines

(1) Title: page titles, description of the site. The secondary label is also valuable to search engines, often including the target keyword.

(2) Meta Keywords: the main keywords in the Web page. Originally is to facilitate the search engine for the classification of the site, but later because many sites in order to make the keyword ranking more favorable, often use this tag cheat, so now this tag for search engines, almost no meaning.

(3) Meta Description: A description of the Web page. Same as keywords, the original is to facilitate the search engine classification, the same is because many sites use this tag cheat, so for the search engine is also not so important. At present, only Google in the mainstream search engine is still crawling the content, but also has little to do with the content to determine the keyword.

In fact, for search engines, the most important thing is the quality of the content. We also do the website for the visitors to promote ourselves. Please do not forget the root because of the quick. After all, users are concerned about whether the data is what they need, not the ranking of your site.

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.