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

Can an ordered list be reversed?

Is there a way to have the numbers of an ordered list go from the largest to number 1 so it's in a countdown format?

1 Answer

Kristine Williams, this looked like a fun puzzle so I thought I'd give it a shot. I hope this helps!

<!DOCTYPE html>
<html>
  <body>

  <h1>Reverse an ordered list</h1>
  <p>Add the reversed attribute to your oL list to reverse the order.</p>

  <p>Standard ordered list.</p>
  <ol>
   <li>First</li>
   <li>Second</li>
   <li>Third</li>
  </ol>


  <p>Reversed ordered list.</p>
  <ol reversed>
   <li>First</li>
   <li>Second</li>
   <li>Third</li>
  </ol>


  </body>
</html>