The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Can you substitute section tags for div tags?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #33684

    Just a quick question. To elaborate: instead of using div tags to separate sections, can I just use section tags? Are they interchangeable semantically?


    Semantically you should be using section tags for, well, sections. Make sure you set display: block; and use the HTML5 shim for older browsers.


    Yeah, section is essentially the HTML5 div. However, I use them both. I use a div for the #page-wrap and section for something big like #main-content. I don’t nest sections though. I just don’t like the thought of it =)

    But I don’t find myself using divs or sections too much. Usually you can replace them with unordered lists, asides, articles, header, hgroup, footer, time, etc.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.