2 ms·
In principle, I agree with you. However, we also have to allow for the very real fact that tables work pretty much exactly the same across all browsers, and all
by thaumaturgy 17y ago
In principle, I agree with you. However, we also have to allow for the very real fact that tables work pretty much exactly the same across all browsers, and allow for some very fine-tuned control over layout.
CSS, on the other hand, is implemented differently from browser to browser. Depending on the layout, sometimes that's a problem, and sometimes it isn't so much, but it still requires specialized knowledge of CSS and browser-specific quirks.
...to say nothing of all the various css "hacks" that are out there.
Given a complicated site layout, I think I'd rather crawl through some table code than crawl through pages and pages of complicated CSS where declarations at the bottom of the file are subtly dependent on declarations at the top of the file.
Also, let's not forget that CSS was not intended for layout. When it was designed, it was designed for specific purposes, and it's since been warped into a layout language.
So, sure, in principle, I agree that it's better to keep your HTML clean and meaningful, and hide the complexity in a separate CSS file.
But let's not pretend that some designers will save time by switching to CSS only, or that CSS-only is simpler, or that there's anything intrinsically bad about using tables for layout, or that developers have no reason for doing so.