Borders on tables now ok in HTML5

If you use tables (not for layout, of course) it can be very tedious to get the borders to surround every cell using CSS. You need to set the border on the table and on every th and td, and then collapse the borders with border-collapse. I don’t know about you, but I would often just add the border attribute to the table, just to get it done quickly.

Well, this week the HTML5 working group decided to make that okay again. They agreed that many tables need to have borders to define the cells. The proposal pointed out that putting CSS on a table to define the borders would not be carried over when the table was moved between implementations. In other words, if you wrote a table in an HTML document, and then ported that document into XML, the borders in CSS would stay with the CSS, not with the table.

Now it is legal to write <table border>  to add borders around your table and table cells. I, for one, am pleased!

One thought on “Borders on tables now ok in HTML5

  1. This is good news and a welcome relief. I was starting to wonder if the fine folks who worked on the HTML5 standard even used HTML anymore. The insane amount of overhead required by the use of CSS to do everything suggested they have forgotten that sometimes *people* make web sites, and mobile devices have to load them *slowly*. Mandatory content increase is a bad idea, and HTML5 is littered with it.

Leave a Reply

Your email address will not be published.