Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Lists.docx58.7 KB Lists - Solution.docx
59 KB
Quick reference
Lists
Ordered and un-ordered lists are popular HTML elements.
When to use
Use this CSS anytime you'd like to style ordered or un-ordered lists.
Instructions
To style an ordered list use:
ol { }
To style an un-ordered list, use:
ul { }
To style the list items of an ordered list, use:
ol li { }
To style the list items of an un-ordered list, use:
ul li { }
To create different ordered list item markers, use one of the following:
list-style-type: upper-roman;
list-style-type: lower-roman;
list-style-type: upper-alpha;
list-style-type: lower-alpha;
list-style-type: none;
To create different un-ordered list item markers, use one of the following:
list-style-type: square;
list-style-type: disc;
list-style-type: circle;
list-style-type: none;
Hints & tips
- ol { } and ul { } let you style lists.
- ol li { } and ul li { } let you style the list items inside the lists
Lesson notes are only available for subscribers.