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 HTML Lists HTML Lists

HTML Lists

Whats wrong with the ordered list nested into "Shapes"?

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>HTML Lists Challenge</title>
  </head>
  <body>

    <h1>HTML Lists Challenge</h1>

    <!-- Write your code below -->
<ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
    </ol>

<ul>
  <li>Shapes</li>
    <ol>
      <li></li>
    </ol>
  <li>Colors</li>
    </ul>

  </body>
</html>
Matthew Leonard
Matthew Leonard
2,885 Points

There is nothing incorrect about your syntax. Make sure to include a value inside the list element nested in the Shape list element. This syntax should create an ordered list indented after the Shapes list element but before the Colors list element.

1 Answer

Erik McClintock
Erik McClintock
45,783 Points

Andrew,

Your ordered list is not nested inside your Shapes list item, it is currently placed after it. Take a closer look at your code:

<ul>
<li>Shapes</li><!-- your Shapes list item closes right here; therefore, your ol is NOT nested inside it -->
<ol>
<li></li>
</ol>
<li>Colors</li>
</ul>

You need to put the ordered list INSIDE the Shapes' list item tags (i.e. before the closing </li> tag) in order to nest it, as follows:

<ul>
<li>Shapes
<ol>
<li></li>
</ol>
</li><!-- this is the closing Shapes list item tag; notice now that the ol is nested INSIDE the Shapes li -->
<li>Colors</li>
</ul>

Erik

Thanks. I was able to get it right