search
HomeWeb Front-endHTML TutorialCorresponding attributes and usage of XHTML tags in CSS_HTML/Xhtml_Webpage Production


When I first came into contact with XHTML CSS to design web pages, I had little experience in using tags and was very casual. I often used whatever came to mind, thinking that as long as it can achieve the effect, it would be enough. But with the deepening of study and understanding of search engine optimization knowledge, I found that the use of tags is actually a science. We have been emphasizing semantics in the CSS tutorial article of Script Home - jb51.net, so how to use HTML tags? Where are they generally used?
When I first came into contact with XHTML CSS webpage design, I had little experience in using tags and was very casual. I often used whatever came to mind, thinking that as long as it can achieve the effect, it will be enough. But with the deepening of study and understanding of search engine optimization knowledge, I found that the use of tags is actually a science.
I will not give a detailed introduction to the corresponding attributes and usage of each tag in CSS here. I will focus on the application in web pages. I hope it can be helpful to everyone.
1. DIV
DIV should be familiar to those who build XHTML websites. Many websites and materials also call Web standard website construction DIV CSS website construction. It is not unreasonable to call it this way, because W3C does not recommend that the Table tag be used in the layout of web pages, and DIV as a layout tag naturally assumes the important responsibility of layout.
DIV can also be said to be a large container. In addition to the overall structural layout of the web page, it is recommended to be used to divide areas that appear to be relatively independent in the web page. Just like a newspaper, the function of DIV is a large container for dividing different content. In different areas, appropriate labels are selected according to specific situations.
2. H tag
The H tag is a title tag, often used before a paragraph to indicate the meaning of the paragraph. It can be divided into H1~H6 according to the level of display and meaning to be expressed.
H1 is of the highest importance and is often used to express a description of the function and nature of the entire website, or to indicate the audience for which the website is intended. Other tags are used to display the name of a certain area or a general description of a certain introductory text depending on the level.
Because it represents a general description of the website or a certain paragraph of text, the H tag has a high value compared to search engines. But this does not mean that it can be used casually. For example, some websites use H tags to display keywords in a paragraph of text in order to deliberately pursue rankings for specific keywords. Or simply use the H tag as a container to layout the web page. This completely confuses the role of the H tag and is not recommended.
3. P
P is a paragraph tag, used to distinguish different paragraphs of a set of text. For search engines, according to their crawling order, the text in the first P tag also has high value. Like Baidu, it ignores the text in the Meta tag description (description) and grabs the content in the first P tag (not absolutely).
Some websites use the
tag when segmenting in order to allow search engines to crawl more content and provide users with a better browsing experience. This is not to say that it is impossible. Sometimes, the desired effect cannot be achieved at all. For strictly typed documents,
It is a tag belonging to the expression form and is not allowed to be used.
Although most websites use transitional document types, I do not recommend using them for text segmentation.
4. UL and LI tags
This is an unordered list, the UL tag is a declaration of the list, and LI is a list item. Due to the relative independence of its projects, it is often used in navigation, news or article lists, etc. UL can also be used as a container to distinguish different lists.
Some websites can pursue "Web standards" and convert Tables to UL and LI. This makes web pages difficult to read and maintain. Wrong understanding goes against the concepts conveyed to us by Web standards.
5. Table
I won’t introduce too much 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 that it is not recommended to use Table for layout and only for displaying data. time to use. Therefore, there is no contradiction between web pages that comply with the Web and the use of Table tags.
6. Tags prepared for search engines
(1) Title: the title of the web page and a description of the website. Subtags are also valuable to search engines and often include target keywords.
(2) Meta keywords: the main keywords in the web page. It was originally prepared to facilitate search engines to classify websites, but later because many websites often used this tag to cheat in order to make keyword rankings more favorable, so now this tag has almost no meaning for search engines.
(3) Meta Description: Description of the web page. 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 that important to search engines. Currently, among the mainstream search engines, only Google still crawls the content, but it hardly determines keywords based on the content.
In fact, for search engines, the most important thing is the quality of the content. Similarly, we build websites to promote ourselves to visitors. Please don’t forget the fundamentals because of the quickness. After all, users care about whether the information is what they need, not the ranking of your website.
The above are commonly used tags that are easier to confuse for beginners. Welcome to pay attention to the updated CSS tutorial articles of jb51.net. If you encounter new problems in the future, we will continue to do so. Expanded recently.
Statement
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
HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool