3 ms·
"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
by 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.