top | item 6320968

(no title)

rob_mccann | 12 years ago

He wasn't arguing against <div> elements. He was arguing against using wrong elements.

<div> is fine for layouts. It's not fine for labels.

discuss

order

roel_v|12 years ago

OK let's say that he's saying that, but then what does that mean? Don't use <div class="para">, but use <p> ? That's about it, then. He rages against 'painting with tags', but then what is 5 nested divs? It certainly doesn't add any semantic meaning, not in the way they are being used in the website.

My passive-aggressive point is that 'semantic html' is an academic concept with a peak in popularity amongst the web dev plebs around 2000 and an occasional flare-up of interest from new-ish developers who re-discover the fundamentals. CSS has failed to make add the 'presentation layer' on top of semantic html as we once thought it would. It's simply not powerful enough. For the dream of real semantic html to come true, CSS should be able to 'implicitly' add elements to the content to apply styling to, so that we can 'add' a div around the body content in order to center it on the page, to name one use case. The cold reality is that nobody cares enough. Just toss in a few divs, use simple tech like html and css to make it look good, send the invoice, go home. Let the Googles of the world care about machine-readable semantics (because that's what we're talking about here - 'semantic html' is BS from a human's point of view, a human wants to have semantics through styling, not separate from it!).

The continual references to 'assistive techology' in the post are especially laughable. Yes yes it's nice that blind people can use the web. Just as it is nice that people in a wheelchair can access buildings. I'm all for that, and I'd love to see more tech that allows people with bodies that function differently from those of the majority of people lead better lives. But arguing for 'semantic html' in that context is fighting wind mills and displays a gross lack of pragmatism. Let's spend our time on things that make the world better, rather than on talking about ways that would make the world better if only everybody in the world changed their behavior.

IanCal|12 years ago

> The continual references to 'assistive techology' in the post are especially laughable. Yes yes it's nice that blind people can use the web. Just as it is nice that people in a wheelchair can access buildings.

It's also a legal requirement in the UK for both of those things.

> Just toss in a few divs, use simple tech like html and css to make it look good, send the invoice, go home.

Just whack in some stairs, nobody cares about the person in a wheelchair stuck at the bottom because it'd have taken longer to do things properly. Accessibility is hard, let's go shopping!

> The continual references to 'assistive techology' in the post are especially laughable.

Would you say that to someone struggling to read your site because you didn't take the time to use the right tags?

> rather than on talking about ways that would make the world better if only everybody in the world changed their behavior.

Screenreaders already exist, making your website accessible improves things even if nobody else does it.

I suppose I'm just confused at your anger over the suggestion that you use p for paragraphs, actually add labels to forms, use em for emphasis, section for sections and h1-h6 for headings. Is it really that hard?

rob_mccann|12 years ago

Creating complex animations and graphics is what he's talking about when he says 'painting with tags'. Things that canvas and SVG were designed to do.

It's not hard to make good quality, semantic html.

It makes code more readable for the next developer, better for SEO etc.

You can use :before and :after to implicitly create elements.

Sometimes needs-must and we have to throw in divs and poor-quality markup (mostly thanks to old IE), but there's no reason for it to be the default standpoint if it takes the same amount of time.