3 ms·
Some objections, even though I don't use tables regularly personally: Tables are usually more bytes of markup (have a lot of nested <tr><tbody> elements) If y
by ericb 16y ago
Some objections, even though I don't use tables regularly personally:
Tables are usually more bytes of markup (have a lot of nested <tr><tbody> elements)
If you are concerned with size, you are gzipping or deflating and these tags should compress well
Tables may require you to use a 'spacer' image (!)
Div's require clear:both and other silliness
We're not living in 1998 (!!)
not really much of an argument--tcp/ip is older than that and we still use it
Tables lock you into the current design and make redesigns much harder than semantic HTML+CSS.
Perhaps a bit yes on your first point, but worrying about cross browser rendering issues twice will kill your time savings from "fast redesigns." If your table is object code, produced by a helper of some sort, this is not necessarily true either.
Tables prevent reuse of content on multiple device formats (mobile / desktop / tablet).
Not sure I follow. The current format for all these devices is just a standard browser + scrolling
Tables prevent content from being easily scraped or translated into other formats (via a screen-reader or XSLT).
Table headers and cells with classes and id's are plenty scrapable
- lwhi 16y agoIf a person really can't see the disadvantages / advantages - I don't mind. But it depresses me to think that some clients (who aren't knowledgeable enough to know any better) are being provided with sites that make use of something that was introduced as a stopgap solution 15 years ago. The main reason people use tables is because they don't understand how to provide the alternative. That's not a good reason. People who do use tables should educate themselves - or pass the work onto a front-end developer.
- Travis 16y agoI can see the advantages and disadvantages. I spent several years trying to force myself to use CSS for layout, because I thought that the abstract benefits of CSS were worth it. Abstract = "easier redesign" or "more accessible" type stuff. Things that had never affected me, yet. And I spent so much time, so much frustration, trying to cram myself into the CSS semantic world. Then I realized, for my startup, that I needed to just BUILD things. I see CSS as providing generally abstract benefits, with very concrete disadvantages. In short, CSS zealots sound to me a lot like this: "Well, if you could understand what you were doing, it would work right." That entire attitude puts me off. Also, I believe it's a false dichotomy to say "no tables", or "only css". I put hacks in my code when it is beneficial for my situation. Tables are one of those hacks that I keep in my toolbox, right next to the duct tape. Frankly, I find it obnoxious that you said, "People who do use tables should educate themselves - or pass the work onto a front-end developer." No. I understand my situation, my context, and my application. I made the decision to use tables, because it was more expedient, and I was insulated from the negative consequences. For you to imply that I'm doing something wrong on my code, well, that's just flat out obnoxious.
- lwhi 16y ago"Frankly, I find it obnoxious that you said, "People who do use tables should educate themselves - or pass the work onto a front-end developer."" I'm not trying to be obnoxious. I didn't mean to offend you, or hit a raw nerve - but sometimes a change does require education. I can't see how declaring "it's not me it's you (CSS)" can be part of a reasonable solution. CSS isn't that difficult - and I'm really tired of hearing (mainly back-end) developers berate something that I (and tens of thousands of other developers) use everyday successfully. I find it obnoxious that so many people who don't understand how to use CSS successfully (and have chosen to use tables as a result) argue so fervently that their decision is the only logical choice ("I don't need to learn it, it sucks"). It's a case of the tail wagging the dog. If you understand how to use CSS successfully and still decide to use tables, then fair enough - but in most cases I don't think there are many good reasons for doing so. -- "I see CSS as providing generally abstract benefits, with very concrete disadvantages." I'd (sincerely) be interested in finding out what these disadvantages are?
- Travis 16y agoSure, a change does require education. Where we differ is that I do not agree that pure CSS layouts are always the "best" solution. The "best" solution takes programmer familiarity, style, languages, business case, time lines, budgets, etc., as inputs. And I'm tired of people telling me how I ought to program. It's generally well intentioned folks who have an idealistic theory (it's easier to modify! scrapers can access it more easily! it allows disabled people easier access!) pushed into a half-ass solution. Yes, I find the CSS2 standard half-assed. For me, it boils down to what I can produce. I have much more flexibility (I can only get CSS to work "right" with certain types of layouts; tables, I can do anything) and am more productive with table based layouts. Perhaps I'll run into a situation where a light bulb clicks on, and I go "Ohhhh, it would've sure been nice if I'd used CSS for layouts here!" But, up until now, I have only ever had the experience of "Fuck, I sure wish I had put this into a table rather than a CSS layout." I've read several of the highly recommended CSS type books (Meyer, a list apart, etc.) I've tried to apply the lessons. I've spent more effort trying to figure out CSS than any single other technology I use. Maybe going to a class would help, or having 1-1 tutoring / peer sessions, but that's not in the cards for the future. So instead, I just pathetically create sites that I love (and are successful, for me) with less frustration, faster, using table layouts. YMMV.