3 ms·
"There's a lot you can not do with table-cells." Could you give a few examples? "it's semantically incorrect" So is "float".
by zeteo 16y ago
"There's a lot you can not do with table-cells."
Could you give a few examples?
"it's semantically incorrect"
So is "float".
- lwhi 16y ago"So is "float"." No, 'float' is a property - '<table>' or '<td>' are elements. Float has nothing to do with semantics, it's purely presentational. By marking up content semantically - it's possible to do interesting things with your marked-up content. For instance, content can be scraped more easily and a screen-reader can use elements to make inferences about the make-up of a page's contents. xHTML can be translated to other forms of XML using XSLT - and HTML content can be shared between desktop and mobile devices with just a stylesheet change. Liquid layouts can be utilised and JS can be used to move content dynamically. There are a huge number of reasons for marking content semantically. Using a table is a bad solution for anything other than tabular data.
- evanrmurphy 16y ago> HTML content can be shared between desktop and mobile devices with just a stylesheet change. Have you been able to pull this off in most cases? In my experience, the mobile version of a site requires changes to the HTML, such as turning links into buttons and removing content.
- lwhi 16y agoIt depends how complex your markup is. I've found that a site that's been developed for the desktop can usually be made much more accessible by offering a different stylesheet. I.e. it's better than the alternative of doing nothing ;) But I agree - it's not always as straightforward as you might hope would be. Sometimes it makes sense to serve different markup.
- btipling 16y agoYou can't resize them easily with JavaScript, you can't move them, you can't hide them and then show them again. You can maybe change the contents and add or remove a class, but because there's so little you can do to tablecells, good luck doing something other than changing background color. Since you're using a table cell for your overall design, heh. Not good.