<br />In previous tutorials of 123WORDPRESS.COM, we have repeatedly emphasized the importance of making web page HTML files semantic. We should choose the most appropriate HTML or XHTML tags based on the structure of the HTML document of the web page, rather than choosing them based on their appearance style. Use the P tag to define a paragraph, not to get a line break effect. We use h1-h6 tags to mark headings, but we don’t use them to achieve text size and bold effects. For example, a title can be defined as h1: <h1>The title of the article goes here</h1> It should not be defined in any other way: <p style="font-size:16px; font-weight:bold;">The title of the article is written here</p> In the previous article of 123WORDPRESS.COM, we listed all the tags allowed by XHTML1.0. We can also find that there are actually very few element tags that we can choose from. But we also clearly realize that these refined elemental marks also have clearer meanings. If you really can't find the right element to mark up, you can use the general div and span tags. The use of div and span tags in the page is a new problem, and we tend to use them too much. Necessary and reasonable use of div can significantly enhance the structure of the document. If you examine your HTML document and find that there are a lot of divs and spans, then you have to look at the problem from a different perspective. Is there any abuse? Are there better markers to replace them? If h1 can better represent the content it marks, then you have to give up p or span to define it. Perhaps this is a contradiction, and it is difficult for us to grasp how to use them correctly, or perhaps we cannot get a clear answer at all. But one thing needs to be clarified, we should make the document have a clear logical structure and it is easier to apply styles. We can think of div as just a container, or a "part" of a document. We use too many containers, which is not a wise pattern. A container that is placed at the right place can make the entire document appear well organized. The following code is more reasonable and effective: <div id="header"> <h1>123WORDPRESS.COMjb51.net. Welcome to <h2>123WORDPRESS.COMWebjx.Com provides the latest and fastest web technology</h2> <p>123WORDPRESS.COMjb51.net provides web page production tutorials, dynamic web page production tutorials, website building guides, Flash animation tutorials, video tutorials, web page special effects codes, web page materials, book downloads and other content. I hope it can help you with your work and study. </p> </div> |
<<: Docker uses the nsenter tool to enter the container
>>: JS+Canvas realizes dynamic clock effect
I used the label tag when I was doing something re...
question: The following error occurred when insta...
This article shares the specific code for JavaScr...
Experimental environment: MYSQL 5.7.22 Enable bin...
Record the installation and configuration method ...
The earliest computers could only use ASCII chara...
What is a directive? Both Angular and Vue have th...
Absolute positioning method: (1) Set the parent e...
EXPLAIN shows how MySQL uses indexes to process s...
Table of contents Introduction to stored procedur...
<br />Maybe you've just come into a comp...
Table of contents 1. Monitoring port Relationship...
Table of contents 1. Preparation 1. Prepare the e...
Docker allows network services to be provided by ...
MySQL has non-standard data types such as float a...