0

I've just started to learn about microdata in HTML. Now I have a simple question about it. I'm using bootstrap to design my website. So I'm using the bootstrap breadcrumb class. In every instructions how to set up the microdata correctly, it says I should add itemtype and itemprop to a div container.

So my question is: Is it possible not to use a div container for this? Is it important to have a div-container?

My example code is something like this:

<div class="col-md-12">
        <ol class="breadcrumb">
            <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a itemprop="url" href="<?= base_url(); ?>home"><span itemprop="title">Ferienwohnung</span></a></li>
            <li itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Anfahrt</span></li>
        </ol>
    </div>

Thanks for any help!

Yannici
  • 736
  • 5
  • 17

1 Answers1

1

Microdata can be used on any HTML element (but note that some elements come with special rules). So yes, re-use your existing markup.

Side note: you are not using the Breadcrumb type correctly; the itemprop="child" must be specified on an HTML element that is a descendant of the parent entry’s itemscope. So it’s not possible to use the child property in a ul (without nesting the list entries). See my answer to a question where the OP used similar markup.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360