This course will be retired on July 31, 2024. We recommend "Introduction to HTML and CSS" for up-to-date content.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
You will learn how to create a list in HTML. Lists are a clean and useful way to organize information and, when paired with anchor tags, create navigation menus.
While we've learned 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 are 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 <ul></ul>
or <ol></ol>
, we then place all of our list items within them.
<h1>My favorite technologies: </h1>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
Would appear in the browser as:
My favorite technologies:
- HTML
- CSS
- JavaScript
Try experimenting with these in your own HTML files to see how they work!
Further Reading:
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up