Anne van Kesteren

Semantics, again?

So I just read some other post. Let's get back to that other point: semantics.

Although it is very interesting to talk about subjects of which the conclusion is quite clear, especially when the only arguments made against are non technical. The greater goal is, however, to improve markup.

Most documents can be improved by removing the tables, putting the headers inside header elements, putting the paragraphs into paragraph elements, putting the content, sidebars and other in various DIV elements. Coming up with the CSS equivalent of the table-based-layout or the CSS version that has advantages over the table-based version and you are done.

Of course, running it through the markup validator is essential. Writing CSS correctly is quite important too. Testing in something standard compliant is probably the most important aspect even though your clients are using Internet Explorer (this is very hard to get for most people, just think about it).

The problem is, however, that although various "standards people" have convinced quite a lot of designers/developers and more and more companies are trying to do something with web standards there is far greater majority that still doesn't get it. (Some companies don't try, they know.)

Maybe the web should be converted first, before we start getting into detail?

It seems a logical point of view, not? The paragraph just above this one. And although I liked it when I wrote it down and started writing a follow-up paragraph on how people may thought I switched my mind and that I just made a controversial point I erased the paragraph and wrote this one.

Details matter.

Comments

  1. Yes, details do matter. When the day comes that the web is converted, the details are there too.

    But seriously, it's not just this. People are already working on XHTML 2.0 while HTML isn't even done yet! Get my point? Keep refining semantics, or rather keep using your semantics well. Be semantically correct, and there's no problem in being "too early" because the rest isn't done yet.

    Posted by Rob Mientjes at

  2. You are right at this point, that's for sure, though there are some other points I'd like to mention:

    People using div's like tables

    As some of you probably have seen, people who used to use tables and switched to div's might not understand the way you should use this type of markup

    Ofcourse it still might be semantic, but is it the right way to be using tags?

    Wrong use of div

    actualy this is an addition to the previous point, but I thought it would be better to mention this without the previous point

    Anyway my point: although a div tag may not have any semantic meaning and you could use it as much as you like (even for layout), shouldn't it have at least a meaning?

    In my opinion you should a div if you need to, that means to group multiple parts on a website or for real layout. But why put a div around around a list? Isn't that using a div while you don't need one

    So here comes my point, shouldn't you know anything about css and go for div's rightaway even if you don't understand what it al means? List are block element as well you know

    Posted by Yorian van Leeuwen at

  3. So here comes my point, shouldn't you know anything about css and go for div's rightaway even if you don't understand what it al means? List are block element as well you know

    You are contradicting yourself.

    You could go for divs right away, but you should try to do it without first. It's possible, as a menu can be a list. The content can be a list too. I don't do it myself, but it works.

    Conclusion: divs aren't unsemantic, but they're not always necessary either.

    Posted by Rob Mientjes at

  4. Well, any time a DIV is the answer, there's a hole in HTML.

    Posted by Anne at

  5. Anne, that doesn't mean that you must stop using divs. I use divs for divisions, but I am wrong in using them to divide some parts of my site. It's not perfectly semantic, but it's a close ones! But yes, of course you can style a page without divs :)

    Posted by Rob Mientjes at

  6. O no, it certainly does not mean that. It means that HTML might be too primitive.

    Posted by Anne at

  7. Too primitive for what?

    Posted by Frenzie at

  8. Too primitive to be semantic rich enough for normal websites.

    Posted by Anne at

  9. Anne, most Web site authors don’t care how semantic their site is, so I’m not sure what you mean by semantic[ally] rich enough for normal websites. Semanticity is only useful if it helps UAs — mainly search engines — aggregate and present information. (For example, if search engines aren’t going to use <address> to find addresses, there’s not much point in retaining <address> in its current form.)

    But semantic markup isn’t the only thing that helps search engines aggregate information; they are also helped by having more data, and by having more-conformant data. If HTML is made more complicated, fewer people will understand it, so fewer people will have the knowledge to publish conformant Web pages. So making HTML more semantic could end up making the Web less useful overall.

    Posted by mpt at