Select the most appropriate XHTML label based on the Web page structure

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Instead of selecting them based on their appearance styles,

should choose the most appropriate HTML or XHTML tags for the Web page's HTML document structure. Use the P tag to define a paragraph instead of using it to get a wrapping effect. Instead of using them to get the text size and the bold effect, we use the H1-H6 tag to mark the headings.

For example a title, we can use H1 to define it:

the following references:


<h1> the title text of the article is written here </h1>

Instead of using any other way to define it:

the following references:


<p style= "FONT-SIZE:16PX; Font-weight:bold; " > The title text of the article is written here </p>

The tags that XHTML1.0 allows us to select are actually very few. But we also have a clear understanding that these refined element markers are also more clearly meaningful. If you really can't find the right elements to tag, you can use the generic div and span tags.

The use of div and span tags on the page is a new problem and we can easily use them too much. The necessary and reasonable use of Div can significantly enhance the structure of the document. If you look at your HTML documents and find a lot of div and span, you have to look at the problem in a different light, is there an abuse situation? Are there better markers to replace them? If H1 can better represent the tagged content, then you have to give up p or span to define it.

Perhaps this is a contradiction, we are also more difficult to grasp how to use them correctly, or perhaps we simply do not have a clear answer. But there's a point to be made that we should make the document logically clear and easier to apply styles. We can just look at a div as a container, or as part of a document. We use too many containers, not a sensible model. A properly positioned container can make the entire document very organized.

The following code is more reasonable and effective:

the following references:


<div id= "Header" >

<h1> website Special effects texiao.admin5.com. Welcome to your arrival </h1>

<h2>> Special Effects texiao.admin5.com The most complete Web page special effects gathering Place </h2>

<p> special effects texiao.admin5.com for personal webmaster and web designers to provide the latest fastest and most comprehensive information resources, including Web production tutorials, web materials, Web templates and so on. </p>

</div>

Related Article

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.