1 registered members (VoroneTZ),
1,244
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
HTML: Why are Tables so evil?
#286179
08/23/09 18:37
08/23/09 18:37
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
I've been pondering around this issue a long time. And I hear it from everywhere, but why EXACTLY is it that tables are evil to use in website design? I personally really like using tables, they are easy to use, you can get a design set up in a matter of an hour instead of days and it just... works. In all browsers. Without using 3 workarounds so it works in Opera, IE and FF. Without using a hack so that I can place that one thingy there where I want it to be, and have it stay there in all browsers. Now, I don't have a problem making a website using divs and css only but it's a painstaking experience. When I have to use hacks and workarounds to accomplish some simple layout so it looks the same in all browsers, it becomes part of a problem, not of a solution. Why not use a table instead? I could have this thing up and running in 10 minutes, but using this DIV there and those CSS properties with a little JS hack takes me a day if I'm lucky. I'll quote a phrase I've seen on another website the other day, unfortunately the comments didn't help me any further, as its just a back and forth between "tables are evil", "no they are not!": "Float elements are not about layout, their primary use is for a block to float inside a text paragraph — like for images in a word processor document." Most of my clients demand websites in DIV and CSS only because someone told them that tables are evil. But _why_exactly_ is that? Answers that are not valid: - If you know CSS well enough you can do the same thing just as well without using tables. (Again, WHY avoid tables in the first place?!) - Tables render slow (I doubt that anyone using a 200MHz PII Processor uses it to browse the internet on a regular basis. With processor powers over 500 MHz that issue really cant be noticed *at all*, yes, maybe a robot with a 2 Teraherz processor would complain cause it would seem like an eternity to him... but a human? the time difference is merely the blink of an eye) - Tables can be inflexible (not as inflexible as using div's with floats and relatives and absolutes and.. and and...) - Tables don’t "degrade" (de...grade...?)
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: HTML: Why are Tables so evil?
[Re: Xarthor]
#286181
08/23/09 19:08
08/23/09 19:08
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
Tables make using dynamic content more work, they require lots more lines of code to accomplish the same effect that css could do with less. Also you don't need to use workarounds for cross browser support, just need more advanced css Css isn't just divs If this site goes back up check it out http://friendlybit.com/css/levels-of-css-knowledge/the same page but working http://www.stumbleupon.com/s/#2sbQTw/friendlybit.com/css/levels-of-css-knowledge//topic:Web%20Development Edit: I can think of more reasons but am eating dinner so will post them later if this discussion goes anywhere : ) More links to help you understand : ) http://www.hotdesign.com/seybold/http://www.hotdesign.com/seybold/03overview.html
Last edited by Blade280891; 08/23/09 19:16.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: HTML: Why are Tables so evil?
[Re: Blade280891]
#286184
08/23/09 19:18
08/23/09 19:18
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
Maybe you mistook me. I have no problem using Tables or DIV's(and CSS). It just requires a LOT more work using DIV's and placing them with CSS. Also you don't need to use workarounds for cross browser support, just need more advanced css Which is a.. workaround, around the issue that you can't do it the simple way. The whole point is: Why difficult if you can do it simple? I would like to hear more of those reasons of yours :-)
Last edited by Michael_Schwarz; 08/23/09 19:19.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: HTML: Why are Tables so evil?
[Re: Michael_Schwarz]
#286186
08/23/09 19:23
08/23/09 19:23
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
If you look at the last link i provided it should provide all the information, including reasons why you should use css over tables.
Some of the reasons are things such as reduced file sizme, support for disabled users (i think tables can affect the way data is read when using web page readers).
Also as i said using tables makes placing dynamic content (either JS/Ajax or just PHP) more complicated.
Another reason is redesigning and maintaining site design consitency is more difficult, where as using css it is simple (sometimes just a case of a different css file)
Also using css allows sites to be redisigned totally just by using a different stylesheet instead of recoding lots.
Edit: Also i wouldn't count using more advanced CSS a workaround as when you start learning HTML you don't know tables to start and probably just use paragraph tags etc. then you find tables and use them, maybe that can be considered a workaround as well ?
Last edited by Blade280891; 08/23/09 19:24.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: HTML: Why are Tables so evil?
[Re: Claus_N]
#286202
08/23/09 20:13
08/23/09 20:13
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
The problem is the "weight" of the table tag. A table implies tabular information, and devices like screen readers treat tables just like that.
Depending on the search engine, the search result might look crippled when using a table for design.
Another point is that you don't separate design from content anymore sicne you're using a table as design element. Of course this is possible, but it's not clean, as when using divs and spans, they do not influence the display of the containing elements directly. The appearance and positioning is all done using CSS - there you have a clear separation between design and content.
Short: Tables should be used for displaying tabular information, just as heading tags (h1, h2...) should be used for headlines instead of some oversized normal text. Use the elements for what they were made for. Tables certainly were not made for doing layouts with them.
Apart from that I don't really think tables make things easier than divs, but I won't start a discussion on this one now. Find out yourself!
If I hired someone to do a website I would insist on proper CSS, without browser switches, without table layout, and of course it should validate at least XHMTL1.0 strict. Everything else I consider as unprofessional Pfusch and not worth paying for. For some private person it might be okay to use tables and do everything quick and dirty, but from someone offering website services I expect a certain professionality which includes following web standards.
|
|
|
Re: HTML: Why are Tables so evil?
[Re: FBL]
#286227
08/23/09 23:17
08/23/09 23:17
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
I agree with firoball completely The only reason i use tables is because i don't have the time or skill to implement CSS for my work as i am mainly server side, so i use tables until i get a designer in.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
|