Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
In about two years ago, Div is a pair of very attractive combination, will use DIV to make the page, people will often be praised by the thumb, remember the beginning of 06, I use div layout of a pure static site also took a school web design Competition award.
Today, despite the mention of Div, there will be a lot of people enthusiastic, but I will shake his head: div not everything, not some people called "myth"! The creation myth is CSS, not div. I think it's time to correct the problem.
The essence of CSS is to use each label.
Blindly esteem div only let small white go astray.
1, Div is only one of the most common HTML tags
Obviously HTML is not just a div tag useful, each tag has its purpose, but Div is one of the most useful one. If the div can implement all the other tags, then the consortium has already streamlined the HTML!
Table is not a good-for-nothing, but with a simple table, easy to use only in the early years by people wrong widely promoted. But the table in the processing of Web page data performance, other tags can not be replaced, but it is not suitable for the entire layout of the page.
2, the readability of the Code
The code of a pure div site is very readable, and even a table can be made by TR and TD to Branch and column, a bunch of div stacked together, if there is no annotation, you do not know what part is to do.
3. Semantic and structured
Now, in the development of CSS, more and more of the semantic, the semantics of the final analysis is actually the readability of the code. Semantics is making the code easier to read and easier to understand, for example,. text_01{color:red} There is no. text_red{color:red}.
HTML is also so, for example, we see <ol> know that this is a sequence table; see <p> tag to know that this is a paragraph, the content is text; see <span> know this is smaller than <p> text unit; see < H1>, <h2> and so on know that they are the title.
Obviously, all div pages are not visible.
The structure of the page is also the case, such as <div><div><div><div>.....</div></div></div></div> Such code, obviously, is difficult to understand its DOM structure, but <div><p><h2><span>.....</span></h2></p></div > is much clearer than the structure above.
believe that the development of the Code of the people to the semantic and structured understanding will be more profound.
4. Team Work
Low readability, structural and semantic differences, the other team members of the learning and maintenance difficulties will increase, which for a team, is a waste of time and energy.
In fact, Div's story has taken us from table to another extreme, the right web design is not a label of the world, but each element uses the appropriate label.
So, div to put it another way, (X) html+css not more appropriate?
Please stop mentioning Div. Little White will really treat it as a treasure!
In fact, looking back at the process of standardization of domestic popularization, has gone the wrong way, in foreign counterparts to study the CSS sprites and grid (grids) and other technologies, we are doing? What are we doing when foreign CSS frames are everywhere? Until now, we still have to go to foreign things, still behind others.
Two years, we are still entangled in div ...
PS: I wrote a blog of the same name six months ago, but at that time, but also at random nagging two words, did not expect these days to see a lot of praise Div article, let me feel, it is necessary to say something ...