Hacker News new | ask | show | jobs
by rob_mccann 4670 days 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.

1 comments

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

:-O

Seriously? Please show me the site that does so, and still looks OK (or even OK-ish) by moderns standards?

"Sometimes needs-must and we have to throw in divs and poor-quality markup (mostly thanks to old IE)"

Look, I take it you are a web dev, am I right? If so, how can you say something like this? Please link me to the last 5 or so sites you made, and tell me which div's and span's you only put in to support old IE versions. Every real site out there today uses div's and span's in non-semantic ways. That was the whole point of my post - :before and :after don't cut it. CSS just isn't powerful enough to make real semantic html happen. It's not a value judgement, it's just stating the blindingly obvious. The fact that the GP's blog post, complaining about this, starts with not one, not two, but five non-semantic div's is a painful manifestation of this.

You're confusing semantic markup for using <divs> for layout.

In < IE8 there's loads of <div class="clearfix"> around because display:inline-block wasn't supported.

Using divs for layout is directly contrary to semantic markup. I wasted a whole paragraph on this in another reply in this thread so I'm not going to rehash that here, but this whole 'oh but it is semantic as long as it's only divs being used for layout' is self-delusion, white-washing and plain sophistry to resolve the cognitive dissonance between 'semantic html is what good devs do', 'I'm a good dev', and 'fuck me, it's impossible to do what I want visually without adding non-semantic tags'.

Why don't we just call a spade a spade - real semantic html is impossible for the vast majority of real-world use cases, and all we're left with is trying not to fuck it up even more by using <div class="p">. Which brings us into, as I called it elsewhere, 'duh' territory.