about two years ago, DIV+CSS is a very attractive combination, make "people who use DIV+CSS often praise to the thumb, remember at the beginning of 06, I use a pure static site div+css layout with a school web design competition award.

today, despite the mention of DIV+CSS, a lot of people will be enthusiastic, but I’ll shake his head: "DIV+CSS is not everything, it’s not what some people call a myth.""! It was CSS, not DIV+CSS, who created the myth. I think it’s time to correct this problem.

The essence of

CSS is that each tag should be used at its own discretion.

‘s blind admiration for DIV+CSS will only make little white go astray.

1 and DIV are just one of the HTML’s most commonly used tags,

obviously, HTML is not just a DIV tag. Every tag has its uses, but DIV is one of the most useful. If DIV can implement all of the other tag functions, W3C has long simplified HTML!

Table is not a good for nothing, just using table is relatively simple, easy to get started, it was widely promoted in the early days of mistakes. But table’s performance in dealing with Web data is no substitute for other tags, but it doesn’t fit into the layout of the entire page.

2, code readability

Readability of

pure DIV+CSS code of the website is very poor, even table can also use TR and td to the District branch and column, a pile of DIV pile together, if there is no comment, you don’t know a part of what it is for.

3, semantic and structured

now, in the development of CSS, more and more semantic, semantic, in the final analysis, in fact, the readability of the code. Semantics is to make code easier to read and easier to understand. For example,.Text_01{color:red} is not easy to understand by.Text_red{color:red}.

HTML the same, such as we see < ol> we know that this is a sequence table; see < p> tag will know that this is a paragraph, the contents of text; see < span> that this is the ratio of < p> also see small text units; < h1> < h2> like they were heading.

, obviously, all pages of div, I can’t see them.

The same is true of

pages, such as <, div>, <, div>, div>, <, &l>