Zebra0.com

html5Lists

Lists

You can create either ordered <ol> or unordered<ul> lists. Each list item on either list uses the tag <li>

Here is an example of an ordered list:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>To Do</title>
</head>
<body>
<h3>To-Do List:</h3>    
<ol>
<li>laundry</li>
<li>homework</li>
<li>buy milk</li>    
</ol> 
</body>
</html>

To-Do List:

  1. laundry
  2. homework
  3. buy milk

Here is an example of an unordered list. Notice that to change a list from one type to the other, only the list tag needs to change, not the list items.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>To Do</title>
</head>
<body>
<h3>To-Do List:</h3>    
<ul>
<li>laundry</li>
<li>homework</li>
<li>buy milk</li>    
</ul> 
</body>
</html>

To-Do List:

Next: Tables