Bootstrap and html5 – section or div?

It really depends on your page’s content but basically you could use HTML5 tags and apply bootstrap classes like this:

<section class="row">
    ...
</section>

<footer class="row">
    ...
</footer>

But as said it depends on your content, and even more, you’re not forced to use <section> tags, they have the specific purpose to represents a generic document or application section, and they’re not mandatory.

The <div> tags are generic tag usually used for styling, as in bootstrap. But if you want to keep the <section> tags, maybe you could prefer a mixed solution like this:

<section>
    <div class="row">
       ...
    </div>
    <div class="row">
      ...
    </div>
</section>

With this solution the <section> tag is used for grouping contents, as it should be, and the <div> tags for styling it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)