We have been emphasizing semantics in our articles on VeVb.com, so how should we use HTML tags? Where are their general use locations?
When I first came into contact with XHTML CSS to design web pages, I had no experience in using tags and was very casual. I often used whatever I remembered and thought that as long as the effect could be achieved. However, with the deepening of learning and understanding of search engine optimization knowledge, it is found that the use of tags is actually a science.
Here we will not introduce the corresponding attributes and usage of each tag in CSS, and focus on the application on web pages. I hope it will be of some help to everyone.
1. DIVDIV should be familiar with friends who build XHTML websites. Many websites and materials are also called Web standard website construction as DIV CSS website construction. It is not unreasonable to call it this way, because W3C does not recommend Table tags to be applied to web page layout, and DIV, as layout tags, naturally assumes the heavy responsibility of layout.
DIV can also be said to be a large container. In addition to the overall structure and layout of the web page, it is recommended to divide areas that appear relatively independent in the web page. Just like a newspaper, the function of DIV is to divide a large container of different contents. In different regions, the corresponding appropriate tags are selected according to the specific situation.
2. H tagThe H tag is a title tag, commonly used before a paragraph, to indicate the meaning of the paragraph to express. According to the level of display and the meaning to be expressed, it can be divided into H1~H6.
H1 is of the highest importance and is often used to express a description of the role and nature of the entire website, or to indicate the audience that the website is oriented towards. Other tags are used to display the name of a certain area or a rough description of a certain paragraph of introduction text according to different levels.
Because it represents a general description of a website or a certain paragraph of text, the H tag has high value compared to search engines. But this does not mean that it can be used at will. For example, in order to deliberately pursue the ranking of specific keywords, some websites use H tags to display keywords in a paragraph of text. Or simply use the H tag as a container to layout the web page. This completely obfuscates the role of the H tag and is not recommended.
III. PP is a paragraph label used to distinguish different paragraphs of a set of text. For search engines, the text in the first P tag is also of high value in accordance with their crawling order. For example, Baidu, it ignores the text in the description of the Meta tag and grabs the content in the first P tag (not absolute).
In order to allow search engines to crawl more content and give users a browsing experience, some websites use the <br /> tags when segmenting. This is not true. Sometimes the expected results are not achieved at all. For documents with strict types (Strict), <br /> is a label that belongs to the manifestation form and is not allowed to be used.
Although most websites use transitional document types, I do not recommend using them in text segments.
IV. UL and LI tagsThis is an unordered list, the UL tag is a declaration of the list, and the LI is a list item. Due to the relative independence of its projects, it is often used in places such as navigation, news or article lists. UL can also be used as a container to distinguish different lists.
Some websites can pursue web standards and convert Tables to express themselves with UL and LI, which makes web pages difficult to read and maintain. The wrong understanding is exactly contrary to the concept conveyed to us by the web standards.
5. TableI will introduce more about the usage of Table here. I just want to say that the Web standard does not mean that Table cannot be used in the future, but it is not recommended to use Table for layout, and it is only used when displaying data. Therefore, the use of web-compliant web pages and Table tags is not contradictory.
6. Labels for search engines(1) Title: The title of the web page, the description of the website. Sub-tags are also very valuable for search engines, and target keywords are often included.
(2) Meta's keywords: the main keywords in the web page. Initially, it was prepared to facilitate search engines to classify websites, but later, many websites often used this tag to cheat in order to make keyword rankings more beneficial, so this tag now has almost no meaning for search engines.
(3) Meta Description: Description of web pages. Like Keywords, it was originally intended to facilitate search engine classification. It is also because many websites use this tag to cheat, so it is no longer so important for search engines. Currently, only Google is still crawling the content in mainstream search engines, but it is almost impossible to determine the keywords according to the content in it.
In fact, for search engines, the most important thing is the quality of content. Similarly, we build websites to promote ourselves to visitors. Please don't forget the root of the problem because of a moment's speed. After all, users are concerned about whether the information is what they need, not the ranking of your website.
The above mentioned tags that are often used for beginners, which are more likely to confuse the usage location. Welcome to follow the updated articles of VeVb.com. If you encounter any new problems in the future, it will continue to expand recently. Discussions are also welcome.