HTML Lists

web authors three ways for specifying lists of information.

HTML Unordered Lists

<!DOCTYPE html>
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul>
<li>white</li>
<li>orange</li>
<li>blue</li>
<li>red</li>
</ul>
</body>
</html>

The type Attribute

<!DOCTYPE html>
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
   <ul type="square">
   <li>white</li>
<li>orange</li>
<li>blue</li>
<li>red</li>
   </ul>
</body>
</html>

HTML Ordered Lists

<!DOCTYPE html>
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<ol>
<li>white</li>
<li>red</li>
<li>blue</li>
<li>green</li>
</ol>
</body>
</html>

The type Attribute

<!DOCTYPE html>
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
   <ol type="1">
   <li>red</li>
   <li>blue</li>
   <li>green</li>
   <li>yellow</li>
   </ol>
</body>
</html>

Leave a Comment