Hello friends - knew to Dreamweaver, coming from Word and one website like 10 years ago. Is it good to use tables in Dreamweaver or no?
Thanks!
Table are a good idea for presenting tabular data.
The general view is that tables are a bad idea for basing a site design on. If you Google it you will get heaps of information about this which will show that the general view is that HTML/CSS is best used by employing employing elements in the way they were intended. It is fair to say that the consensus here will be that tables are not a good idea for site design.
Martin
Personally? No I don't have any links. But take a look at http://www.alltechsecurity.com
I used to work for them five years ago, and offered to re-do their site last year. That's what they paid $2400 for.
Just for giggles, I "redid" it with DIVs and full CSS. It looked IDENTICAL the way I did it, but the index page (458 lines of code and 13kb) was reduced to 245 lines and 3kb without all of those tables, tr's and td's with inline styling. In fact, the entire site was reduced to less than 30% of the original size when I was done with it.
Sadly, my old boss didn't really care that I could have done it better for less than he paid someone 480 miles away to do that mess.
Define "less code."
A really simple page, laid out in tables may not have significantly more code than a proper website using HTML4 and CSS. And this is due to the fact that you tend to discount the stylesheet when you are counting lines of code.
In fact, I can see where one might actually have more lines of code in HTML4/CSS with no tables than a page laid out using tables if the entire page consists of header, footer navigation and a short line of text with a mailto: link, as in a contact page. Especially where the CSS defines pages and styles other than the ones being displayed.
But it's not about how much code you have.
One reason why we discount the code in the style sheet is because we know that a browser loads that style sheet and keeps it in memory when loading additional pages on the same website. So once it's loaded, the client's browser knows how to style all of the rest of the pages on the website.
Table-based websites are a problem because:
Now, if one does have tabular data, it is highly recommended that one do use tables. And one may style those tables in CSS.
mhollis55 wrote:
Define "less code."
A really simple page, laid out in tables may not have significantly more code than a proper website using HTML4 and CSS. And this is due to the fact that you tend to discount the stylesheet when you are counting lines of code.
In the example I posted above (certainly NOT a really simple site), there are fourteen pages in all, and even with a 3kb stylesheet which it didn't have before the redux, it still netted a 67% sitewide size reduction... because they ididn't even use a simple inline style in the <head> but rather chose to do all of it in the tr and td tags.
I have't used a table layout since 2006, and stand by what I said oroginally. I have yet to see a tabled layout that doesn't look as good or better with DIVs and CSS... WITHOUT all those tr's and td's and all the individual styling code that can be done with a single stylesheet for the entire site as opposed to 2-3kb (or more) of extra code per page.
Oh, I do realize you are using actual pages, Curtis.
But I was just handed a "beauty" of a table-designed website and will be laying it out in div tags. His original website (which he designed-HA!) has a Contact Page that has 22 lines of code. There is no style sheet. On my own website, 22 lines of code doesn't take you past navigation.
And I know that my style sheet is around 300 to 320 lines of code.
So you can see that if you're doing something really simple here, the claim that proper div layout with HTML and CSS can run longer and may take longer to load. And that is what I was thinking of when I said, "Define 'less code.'"
Your main point is correct. This is a better way to lay out web pages. It's not about how much code there is, it's about all of the other things, too.
True, the amount of code alone doesn't define a good site.I just HATE opening up a page and finding that I have to go through forty or fifty DOZEN TRs or TDs to find the one I'm looking to change the style on, especially if there are tables within tables and styles within the styles... then have to do the same for every last page of the site.
Far easier to see the ID of a DIV and find it in the stylesheet to make the site-wide change.
North America
Europe, Middle East and Africa
Asia Pacific