Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still haven't found one good reason to use any of the semantic HTML5 tags instead of just good old divs. This didn't convince me.


For tools which simplify/standarize webpage presentation (e.g., Pocket, Instapaper, Readability) this makes parsing easier.

I'm leaning strongly toward favoring a browser model which just says buggerall to the site's layout and applies a user-specified preference of styling consistently. I'm already pretty much doing this myself via my own CSS mods using Stylebot, and in most cases it makes sites vastly more readable and less distracting.

In particular crap such as Buzzfeed (I call my styling "unbuzzed"): https://plus.google.com/104092656004159577193/posts/G6pzJBLK...


The nightmare of divs makes it hard to find the end div unless someone is disciplined enough to indent the code consistently OR if comments are inserted at the end of divs as in

    <div class="header">
        ...
    </div>  <!-- header-->
Using semantic tags makes it much easier to see the structure.


I indent religiously, and I comment, but I use a lot of static site generator-type software and I've yet to find one that doesn't completely ruin the indentation in the output, even with the various kinds of HTML-prettify plugins.


<header>…</header> header {…}

is slightly shorter than

<div class=header>…</div> .header {…}


It's easy to present a special use example as a benefit over the current trend. It doesn't mean it would hold up over multiple comparisons.

Although, any example that I could provide that would show the exception would also likely be a special use example. So it turns into a your mileage may vary situation.

But, I've not always seen a slightly shorter amount of typing as a benefit to this sort of thing.


And what does

    <main role="main"> 
buy us?


You only have to specify the role for IE, once that complies you can use <main> rather than <div role="main"> or <main role="main">


Thanks. I just thought I was having a Mugatu moment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: