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 Creating HTML Content Add Image Gallery Content

Unordered list

Without using il tag can we give the list?

I mean ul

3 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

You need ul tags if you want an unordered list.

<ul>
   <li>Apples</li>
   <li>Pears</li>
   <li>Bananas</li>
</ul>

Gives you:

  • Apples
  • Pears
  • Bananas

There are also ordered lists, which are written the same way, except they use ol tags instead of ul tags (this is why you need the tags instead of just the list items. Check out the code below. The only difference is the ol tags.

<ol>
   <li>Apples</li>
   <li>Pears</li>
   <li>Bananas</li>
</ol>

Gives you:

  1. Apples
  2. Pears
  3. Bananas

Thanks for your help greg

No, you need a ul or an ol list. The semantics of the HTML would not be good. take a read on the <li> element.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li

Thanks for your help