4 ms·
why is this better than tables?
by return0 10y ago
why is this better than tables?
- dvh 10y agoBecause tables are bad!
- coldtea 10y agoBecause designers parroted some early bullshitters and applied the "semantic" and "separation of content and presentation" notions at the wrong level.
- MisterBastahrd 10y agoMore flexible than table based layouts and it doesn't completely hose screen readers for the visually challenged.
- ZeroGravitas 10y agoBecause <table> indicates that it contains tabular data, and implies lots of things about the content that it contains that would be misleading when using table-based layout. And display: table, which uses CSS to make things look the same, without implying anything about the content, wasn't supported by Microsoft, back when they they were a) the only browser that mattered, and b) trying to hold back the web to protect their monopolies, so people worked around their damage by using the tools that happened to already be available in IE (see also the invention of AJAX) Once Microsoft caught up, people who understand CSS started using display: table whenever it helped. People who didn't kept complaining that you couldn't just use <table>.
- return0 10y agoWell the issue of semantics was not exactly solved by turning everything to <div>s. It's still a mess, but a different mess. I would even say it's bad to have display:table-cell because it's reduntant.
- ZeroGravitas 10y agoIf you're using a <div> just so you can lay things out visually, then its lack of semantics is appropriate. Presumably you use artices, headers, paragraphs, asides, links, img, lists etc. within those non-semantic "container" divs to convey the semantics. I'm not claiming it's perfect, but it's like government data being released as a CSV vs a PDF with a scan of paper document. Structured data is better for lots of reasons, even if it's only minimally structured.