Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

To be honest the css property display:table isn't bad itself.

What we were reproaching to the <table> tag was to be wrong on the semantic side.

If you use divs and style them with display:table I see absolutely nothing wrong here, semantic is right, you infer the display behaviour through css.



I think you're still falling into the religious trap here. Quite often I will put inline css into the html page, or use a table tag. Normally I would never admit this, as I would be hounded by css zealots. Often I do this when I'm building a user interface in html/javascript, or for a single one-off layout in a single page. Using external css in these cases would make it much more difficult to understand/maintain.

I can understand the argument that "you should put styling into an external css so you can just change it in one place rather than throughout the code". However that argument doesn't apply to many use-cases.


It comes to knowing your tools and craft.

Part of the madness was due to tools that auto generated attributes and browser implementations when repainting/reflow occurred.

If the time, and potential knowledge was there, to better organize the structure vs. the layout thing may have been different. We would probably still be wrestling with browser issues.

I have worked in places where corporate sites had tables were littered with font tags for each cell, littered with a half dozen iframes(!?!)

The use for tables in layout was easy, but the long term debt was never paid.

Granted this is less of a case now; wading through this was not fun.


I definitely agree that in cases like that CSS is the much cleaner solution.


I can't imagine a situation when using external CSS could make something to be much more difficult to understand and maintain. And no, I am not trapped by any religion, I do use inline CSS and <table> from time to time (only way to handle styling for e-mails) - and it is always a very, very painful experience.

It's simple as that: if you don't have to (e-mails) do not use inline CSS. Never, ever. And the same goes for <table>. It will actually save you a lot of work.


It's not that external CSS will make it much more difficult to understand and maintain, just a little bit.

For example, I have a page that uses html5 to draw a playback progress bar. The canvas tag has an inline style giving the width and height. If I put this in an external css it would mean I would have to either create a new css page, or put it into an existing page (and then put a comment in the css saying which file it was for). Thus the html is larger in total, possibly more files to download, more files to maintain, and if you want to tweak the layout you have to hunt in the css for it (rather than it being right there).

In cases like this where it is a single tag, using inline styles just simplifies development and maintenance with no downside.


Not sure that's a very good example to be honest. Why would you need to create an entirely new CSS file for this?

And adding a single comment line in addition to your style sheet isn't exactly going to break the bank.

What if your client comes back to you in a few weeks/months and says "I want another playback progress bar on another page"?


For tabular data, tables are semantic.


Yep, sorry I took a shortcut, I was referring to using table as a positioning method for the layout. Of course table are perfectly fine to display tabular data :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: