3 ms·
Not a web dev so I'm curious to know what the problem is.
by veltas 5y ago
Not a web dev so I'm curious to know what the problem is.
- laumars 5y agoi know I’ll get downvoted for saying this because there are a lot of front end developers on here who fail to question the sanity of their tools but the current mess with <table> (and most of front end development) is an acute suffering from not invented here syndrome. Why have a construct purposely for tabulated data when you can reinvent the wheel with a nightmarish array of divs and complex CSS. /s (honestly though, before anyone does mod this post down, pause for a moment and ask yourself this question. If you have a good answer then I’d love to hear it). The problem is web development went too far down the CSS “all the things” route and instead of using it for styling, developers use it for near enough the entirety of web layout. Which makes no sense when you have data that needs to be structured in specific ways (namely tabulated data). In those scenarios the layout is as much a part of the content as the data itself. Thus CSS there should be used to make the tables attractive rather than using CSS to construct the tables themselves. I’m not saying <table> doesn’t have its warts but really what should have happened was those warts fixed rather than creating a whole new set of warts and complexity with divs. Again, before anyone votes me down, pause and try to answer this question yourself. Obviously divs do have their benefits elsewhere in web design; I don’t miss using tables for general purpose layouts. But for tabulated data tables are absolutely the right tool… or at least that should have been the case if sensible people were left to define pragmatic web standards.
- LocalPCGuy 5y agoI'm not saying there aren't some devs who fit in the box you describe, but semantic HTML is an important part of web dev and many front end devs still ascribe to it. As you said, tags have meanings and we should use the appropriate one for the appropriate thing. And there are most definitely ways to use even the table tag responsibly (and responsively, although that is harder). And that is absolutely the standard. Just because people ignore it doesn't mean the standards don't exist. Random blog posts do not change that.
- lwhi 5y agoYou're mistaken. Frontend developers use tables for tabular data. I really don't understand what you're trying to say.
- laumars 5y agoYou’ve posted the same comment twice so I’ll post my same reply twice: There’s plenty of comments in this discussion from developers saying they specifically don’t use <table> even for tabulated data.
- lwhi 5y agoThe article we are commenting on was specifically written around 2006 to discourage tables from being used for layout, which was a common approach at the time. Some people can construct tables from P tags for all I care. It doesn't mean it's common amongst professional developers and it doesn't mean it's correct.
- laumars 5y agoI know what the article is about. I’m not commenting on the article though. I’m commenting on the more extreme opinions in this thread. If you don’t care what those other developers do then why bother replying to me in the first place?
- lwhi 5y agoUp until CSS was a viable thing, people built websites in a very different way to our modern approach. In order to get things to line up, everything was put in a table with invisible borders. If there was a gap, a transparent spacer.gif image was used to plug it. A lot of people liked this way because it was easy to understand, and they were used to it .. but we were effectively hacking the main semantic purpose of a table element to use it for layout ... .. also there was no separation between the presentation and content layers. CSS Zen Gardens signalled a turning point, and was designed to help show the power provided by CSS.
- laumars 5y agoThat doesn’t answer the question though. I doubt many developers would be in favour of using tables for layout over divs. however the same doesn’t apply for why one must use divs for tables (ie actual tabulated data) instead of tables.
- lwhi 5y agoI think you're confused. We use tables for tabulated data. CSS gardens was created specifically to stop people from using tables for layout.
- laumars 5y agoThere’s plenty of comments in this discussion from developers saying they specifically don’t use <table> even for tabulated data.
- lwhi 5y agoI've never met a professional frontend developer who does that. CSS Zen Gardens is from around 2006.
- laumars 5y agoYet there are comments here advocating that. I’m not saying it’s typical, I’m just saying why it’s dumb. I know when Zen Gardens was released. That fuck all to do with the discussion though. And can you please limit your replies to one thread rather than spamming the same comments on multiple threads.