To clarify... I wasn't saying I was going to use frames, what I meant was what would happen if I wrote perfect XHTML (with no frames) but gave it the HTML4.01 Frameset DTD? (which I'm guessing would be the least strict one besides no DTD at all) Would it display properly, since a perfect XHTML page with no frames fits all the criteria for that DTD... or do the XHTML DTDs do something different? Do the DTDs make the page function worse as you become less strict (so XHTML Strict would always work properly, whereas HTML4 Frameset might not (assuming that the code follows all the XHTML Strict criteria))?
Doctypes only define the standard you wish to use, and (to my knowledge) have no effect on the actual rendering of the page.
Oh, and another question... what exactly is bad about using the <table> tags to do layout? I keep seeing all these websites / people saying "Never use tables for layout!" but no one ever explains why... the few things that I've heard were:
to be the standard layout tool, but are frowned upon in modern web design because it is more efficient to use a combination of Div tags with CSS styling. The introduction of CSS has generally caused Tables to return to their originally-intended use: sorting data in a table format.
- It's only done out of laziness (which I don't see why it matters... if the page runs fine I could care less if a web page designer was lazy or not)
Like doctypes, it's more of a Standards issue, rather than function. It's become standard practice to use Divs rather than tables - most sites that currently use tables are doing so because they were designed as such for years. The current theme on this forum, for example, is still heavily table-based, as are most web forums at the moment.
- The code is harder to read / write (which I disagree with... and it doesn't need to be easy to read / write anyway. Saying <b>bold text</b><i>italic text</i><u>underline text</u> is a lot easier to read and write than <span style="font-weight:bold;">bold text</span><span style="font-style:italic;">italic text</span><span style="text-decoration:underline;">underline text</span>, yet the one with the CSS is the one to use).
Actually, <b> and <i> have been deprecated and replaced with <strong> and <em> (emphasis), but I do see your point. Most browsers still support the older tags, however.
- The table has to load in an extra element or something so it loads more slowly (this makes absolutely no sense... a single table isn't going to noticeably slow the page at all...)
Not quite sure where they were going with this. Even if that were true, it's nowhere near enough of a performance issue to have any impact.
- It's bad for accessibility (like if someone has the browser read the page to him... however, this doesn't really matter for the purposes of my page (which isn't meant to have the contents spoken) and additionally I can get the brower's speech option to work fine in a table)
There are some issues with accessibility features, such as web readers and magnification. This is mostly a User Experience issue, when you have disabled users attempting to use your website. Which, at this level, you really don't have to worry all that much about.
Does anyone have an actual reason other than personal opinion / preference as to why tables should never be used for layout? Just wondering... my layout actually doesn't use tables but I don't understand why people say to avoid it like it's the plague.
Just about everything dealt with here is a Standards issue, rather than functional issues. People avoid it like the plague because less experienced users tend to exaggerate what they are told by more experienced users, and experienced users tend to exaggerate what they tell less-experienced users. It will be years
before any of the now-deprecated functionality no longer functions, so you don't have much to worry about.
Still, if you're considering doing web development in any serious capacity, you're going to want to drop the use of tables and learn to do Div-based interfaces. Ultimately, DIVs with CSS are more capable than tables.