Div+css page layout without abusing div elements

Source: Internet
Author: User
Tags html tags

CSS page layouts should avoid abusing DIV elements that have been advocated by us, and organizing documents with appropriate HTML tags is the basis for CSS page layouts.

The use of DIV and span elements in a 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, which we have been advocating.

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 view the div only as a container, or as part of the document's composition. We use too many containers, which is not a sensible model. And just right in a reasonable position of the container, you can make the entire document is very organized, neat and beautiful.

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.