Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Responsive Web Design and Testing Website Testing

Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.

adding <section><h1> unordered list content here <h1></section> gives this error.

Error: Element ul not allowed as child of element h1 in this context. (Suppressing further errors from this subtree.)

<section>            <ul id="gallery">                <li>                    <a href="img/numbers-01.jpg">                        <img src="img/numbers-01.jpg" alt="number1">                        <p>experiment</p>                    </a>                </li>                <li>                    <a href="img/numbers-02.jpg">                        <img src="img/numbers-02.jpg" alt="number2">                        <p>experiment</p>                    </a>                </li>                <li>                    <a href="img/numbers-06.jpg">                        <img src="img/numbers-06.jpg" alt="number6">                        <p>experiment</p>                    </a>                </li>                <li>                    <a href="img/numbers-09.jpg">                        <img src="img/numbers-09.jpg" alt="number9">                        <p>experiment</p>                    </a>                </li>                <li>                    <a href="img/numbers-12.jpg">                        <img src="img/numbers-12.jpg" alt="number12">                        <p>experiment</p>                    </a>                </li>            </ul>        </section>

3 Answers

Actually I simply added

<h2>Heading</h2> following <section>, instead of <h1>...</h1> and that cleared everything.

Thank you! This was helpful-

adding <h2>Heading</h2> following <section> cleared my code for the check.

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

Try adding the Heading1 element as a child of section but a sibling or the unordered list element as below.

<section>   <h1>Heading></h1>
            <ul id="gallery">
            </ul>
</section>

It looks like you're trying to wrap the whole h1 element inside the section around ul

Warning: Consider using the h1 element as a top-level heading only (all h1 elements are treated as top-level headings by many screen readers and other tools).

I received the same issue with the <section> code. all other code works fine though.