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

Help please!!!!

This code doesn't make any sense.

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>
      <li> Colors</li>
    </ul>



  </body>
</html>

2 Answers

What is it that you are finding difficult to grasp?

There's two seperate lists that will be displayed on the page, an ordered list <ol> and an unordered list<ul>.


Ordered list

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

So the ordered list starts with the <ol> tag. Then before the closing tag, there are three list item, which use the <li> tag.

The list items will be marked with numbers by default when rendered in the browser, e.g.

  1. Stop
  2. Drop
  3. Roll

More info on ordered lists can be found here


Unordered list

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

The unordered list starts with the <ul> tag. Then before the closing tag, there are two list item, which again use the same <li> tag that was used in the ordered list.

The list items will be marked with a bullet-point by default when rendered in the browser, e.g.

  • Shapes
  • Colors

More info on unordered lists can be found here


Hope this helps!

Regards.
Berian

As you know I am in a challenge, so what it saying is that,I should nest the ordered list in the list shapes, so what that does it mean?. thank you.

You can nest new lists within existing list items.

So after shapes you need to enter the tags for an ordered list. Like so:

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

These can then have their own list items which would render in the browser like:

ā€¢ Shapes

  1. Square
  2. Circle

ā€¢ Colors

  1. Red
  2. Green
  3. Blue