Careeroza
Lists
Unordered Lists
Example
An unordered list starts with <ul>. Each item starts with <li> and is marked with a bullet:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>Result
Ordered Lists
Example
An ordered list starts with <ol> and is numbered. type and start change the numbering:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<ol>
<li>Preheat the oven</li>
<li>Mix the ingredients</li>
<li>Bake for 30 minutes</li>
</ol>
<ol type="A" start="3">
<li>Third option</li>
<li>Fourth option</li>
</ol>
</body>
</html>Result
Description and Nested Lists
Example
<dl> lists terms (<dt>) with descriptions (<dd>). Lists can be nested inside list items:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<dl>
<dt>HTML</dt>
<dd>The structure of web pages</dd>
<dt>CSS</dt>
<dd>The style of web pages</dd>
</dl>
<ul>
<li>Frontend
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>
</li>
<li>Backend</li>
</ul>
</body>
</html>Result
Tip: Navigation menus are usually built as a <ul> of links, styled horizontally with CSS.