Bullet lists and numbered lists - A Smarter Way To Learn HTML & CSS (2015)

A Smarter Way To Learn HTML & CSS(2015)

37
Bullet lists
and numbered lists

The HTML term for a bullet list is unordered list. Unordered means not numbered. An ordered list is a numbered list. Making bullet and numbered lists in HTML is convenient, because HTML automatically indents lists and automatically numbers ordered lists.

In both types of list, you write a tag for the list—<ul> for unordered lists and <ol> for ordered lists. Then you write a tag for each item— <li>, which stands for list item. <li> is the tag for individual items in either type of list, ordered or unordered.

This code creates a bullet (unordered) list.

<ul>
<li>Sun</li>
<li>Moon</li>
<li>Planets</li>
<li>Stars</li>
</ul>

This code creates a numbered (ordered) list.

<ol>
<li>Wash</li>
<li>Rinse</li>
<li>Repeat</li>
</ol>

Things to notice:

· Each list item is indented two spaces.

· Each opening tag is completed with a closing tag.

Sample HTML code is at:
http://asmarterwaytolearn.com/htmlcss/practice-37-1.html.

Find the interactive coding exercises for this chapter at:
http://www.ASmarterWayToLearn.com/htmlcss/37.html