A netizen's understanding of W3C standards, refactoring and CSS layout

Source: Internet
Author: User

  I have explained on 52CSS.com many times that WEB standards are a series of standard sets, not just the "DIV + CSS" layout. CSS web page layout is only one of the basis of the standard. The "DIV + CSS" layout is just a common name. The goal of our learning is to establish a good semantic structure with XHTML, and use CSS to maximize the separation of presentation and content.

I don't know when to start. I can see div + css everywhere on the network. What is div + css? Is it the legendary standard reconstruction? Isn't the standard a reasonable use of xhtml labels from the simplest root? But why are there so many div + css? Since div + css can be used, why not span + css ul + css li + css?

Questions, full of questions! In order to answer this question, I rummaged over the things in my mind from the very bottom.

A few years ago, we all used tables for layout. We did not find anything inappropriate. We have been using the book website reconstruction and many people began to discuss refactoring shortly after it came out. At that time, I was not clear about the so-called refactoring. Of course, it is not very clear now. As for the book "website reconstruction", I have not read many pages and dare not say that I know everything. But for now, there are still many friends who are switching from the table layout, including myself.

After reading many tutorials on the Internet and articles or problems mentioned by many friends, what is indispensable in the code structure is div. Even the code structure contains only the div labels in the body and cannot find any other labels used to process the structure. Maybe that's why div + css emerged, and div is used for layout, and css is used for style display. Is that the standard?

After table is replaced with div and td is replaced with ul, what about other xhtml labels?

Some may say, "I use div for layout, so I want to call it div + css, and now everyone is calling it like this ". Well, that's right, because div has no semantics in xhtml and is a block element. It is reasonable in layout. However, if the div is called div + css independently because of this, it seems that it can be flat with xhtml. It's just like your generation was originally a younger generation, but you ran to compete with the elders for a seat. It's so bad, isn't it?

After talking about this, I just want you to stop talking about div + css in the future. Why can't you name it xhtml + css with two more letters? If you think this is not the case, you can call it website reconstruction. You can also call yourself a website reconstruction engineer. What a nice name is, you can never ask someone to call your div + css staff.

We recommend that you use less div and more tags reasonably. Do not forget that there are many p and form tags in xhtml. The rational use of tags and a reasonable page structure make it easier for your site to find important content. To put it simply, we all know that hn (n = 1, 2, 3, 4, 5, 6) is used in the title. Can p, form, and table allow them to have their own position in the page structure?

The above is just my personal opinion on div + css that is everywhere on the Internet in terms of text. Some people criticize the incorrect text expression, but what I hope will not be called div + css any more, div is not the main thing, mainly xhtml.

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.