Croco
Croco

Reputation: 366

Orphan element after HTML5 sectioning element in a document outline?

The code:

<section id="sec1">
    <h1>header</h1>
    <p>paragraph</p>
    <section id="sec2">section</section>
    <p id="p2">paragraph</p>
</section>

Question: where would be the #p2 element in a document outline? Does it belong to #sec1 or #sec2?

Upvotes: 0

Views: 38

Answers (1)

Fabien Warniez
Fabien Warniez

Reputation: 2741

It belongs to #sec1 since it's not in #sec2.

Upvotes: 1

Related Questions