DEV Community

Discussion on: Stop using so many divs! An intro to semantic HTML

Collapse
 
crasheddummy profile image
CrashedDummy

Thanks for answering !
It feels clearer now.

Last question, just to be sure I understand well, would it be correct to do the following :

<section itemscope itemtype="http://schema.org/Blog">
    <article itemscope itemtype="http://schema.org/BlogPosting">
        <--! header, sections, footer-->
    </article>

    <article itemscope itemtype="http://schema.org/BlogPosting">
        <--! header, sections, footer-->
    </article>
</section>
Thread Thread
 
kenbellows profile image
Ken Bellows

I don't see why not! Two tangential comments though:

  • Each <section> should ideally have a heading tag (<h1>-<h6>) to identify the section. Remember that a <section> should be something you'd list in your table of contents, so what would you call that section? Though I recognize you might have skipped it for the sake of example code, and of course this has no effect on the main point

  • Your comment syntax is slightly wrong, it should be <!-- rather than <--!. But again, no effect on the main point

Thread Thread
 
crasheddummy profile image
CrashedDummy

Thanks again !
And :facepalm: for comment syntax X)