HTML Lists2:32 with Treasure Porth
You will learn how to create a list in HTML. Lists are a clean and useful way to organize information and, paired with anchor tags, to create navigation menus.
While we've learnt that <p> tags are great for defining sections of text on the page as paragraphs, HTML offers us additional flexibility to arrange content in numbered or dot point lists.
There are two common types of list tags that you will use within your HTML files:
- <ul></ul> - Unordered list. For listing things that do not need to be in any specific order.
<ol></ol> - Ordered list. A list that is automatically numbered.
The names of these two tags is what defines how the items within the list will be presented, but the items themselves will always be defined in the same way:
- <li></li> - List item. The individual dot points or numbered items that appear within the list.
When we define a list type with either
<ol></ol>, we then place all of our list items within them.
Would appear in the browser as:
My favourite technologies:
Try experimenting with these in your own HTML files to see how they work!
You need to sign up for Treehouse in order to download course files.Sign up