See the following two sections of code:
<HTML>
<Head>
<Style type = "text/CSS">
SPAN, div {
Width: 100px;
Border: 3px outset buttonface;
}
</Style>
</Head>
<Body>
<Span> <div> Hello </div> </span>
<Span> <div> world </div> </span>
</Body>
</Html>
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Style type = "text/CSS">
SPAN, div {
Width: 100px;
Border: 3px outset buttonface;
}
</Style>
</Head>
<Body>
<Span> <div> Hello </div> </span>
<Span> <div> world </div> </span>
</Body>
</Html>
The difference between the two code segments is only the doctype declaration, but please check their display effect in IE6. The 1st code segments are all in the same line, while the 2nd code segment produces a line break! In ff, the display effect is another scene ......
I used to think that with CSS, tables can be discarded. But now we find that CSS is also unreliable.
For example, I may write a page component and use CSS to control the layout. But how do I know what kind of doctype the secondary component will be used?
In addition, this doctype is generally not very concerned. I used to do this because I don't know what the difference is.
It seems that it is more appropriate to use tables in some places, and it is more convenient to process them than Div and so on. Without the final unified standards of HTML and CSS, the table can continue to emit its youthful vigor!