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

Chris Gains
Chris Gains
2,888 Points

Can anyone take a look at my code to question - Add a nested ordered list to the "Shapes" list item.

<dl> <ol> <li>Stop</li> <li>Drop</li> <li>Roll</li> </ol>

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

7 Answers

Callum King
Callum King
6,470 Points

There is no code Chris? Use the 3 backticks (```) on the line before and after your code.

Chris Gains
Chris Gains
2,888 Points

Hi Callum

Here it is

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

<h1>HTML Lists Challenge</h1>

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

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

</body> </html>

Hi Chris,

Looks like you may be mixing different types of list together which is why its not working.

An unordered list looks like:

<ul>
    <li>Example Content</li>
    <li>Example Content 2</li>
</ul>

An ordered list looks like:

<ol>
    <li>Example Content</li>
    <li>Example Content 2</li>
</ol>

A definition list looks like:

<dl>
  <dt>Title</dt>
    <dd>Description</dd>
  <dt>Title 2</dt>
    <dd>Description 2</dd>
</dl>

A nested ordered list (an ordered list inside an ordered list), should look something like:

<ol>
    <li>Content 1</li>
    <li>Content 2:
        <ol>
            <li>Nested content 1</li>
            <li>Nested content 2</li>
        </ol>
    </li>
    <li>Content 3</li>
</ol>

Hope this helps!

Callum King
Callum King
6,470 Points

The ol tags should be within the li tags for the shapes list.

    <ul>
      <li>Shapes
        <ol></ol>
      </li>
      <li>Colors</li>
    </ul>
Chris Gains
Chris Gains
2,888 Points

I was getting confused by adding the </li> after 'Shape'

Chris Gains
Chris Gains
2,888 Points

I was getting confused by adding the </li> after 'Shape'