Chapter 4.1: Ordered Lists
When creating lists with HTML, there are four kinds of lists. An Ordered List, Unordered list, Nested List, and a Definition List. Those are the four categories of lists. Now of course HTML abbreviates just about everything to a simplified version. <p> for paragraph, <i> for italic. And in this case, <ol> for ordered list. Now like when we defined addresses we had the address attribute at the top, it defined what it was, it didn't show content. Well that's the same with these four categories. Now start off by making yourself an ordered list tag, go a line down and then end it.
<ol>
</ol>
Now the only thing that goes inside a ordered list is a numbered list, but its not <nl> to do this. It's actually <li> . (this stands for Listed Items). Because it is primarily used for listing items, since this type of list displays things with numbers. So place that inside the <ol> tags, end it, and in-between put an item. Then you can repeat that on a line below it with something else.
So...
<ol>
<li>Butter</li>
<li>Milk</li>
<li>Cheese</li>
</ol>
Will make...
<ol>
</ol>
Now the only thing that goes inside a ordered list is a numbered list, but its not <nl> to do this. It's actually <li> . (this stands for Listed Items). Because it is primarily used for listing items, since this type of list displays things with numbers. So place that inside the <ol> tags, end it, and in-between put an item. Then you can repeat that on a line below it with something else.
So...
<ol>
<li>Butter</li>
<li>Milk</li>
<li>Cheese</li>
</ol>
Will make...
- Butter
- Milk
- Cheese
Now when making a Unordered list it is the same concept. Only use <ul> instead of <ol> You still use <li> tho since its the top tags that actually define what it is as a whole. The UnOrdered list is best used for showing the steps you have to take, or different facts about stuff.
So...
<ul>
<li>Are great for your health</li>
<li>Have Protein</li>
<li>All come from a cow</li>
</ul>
Will make...
So...
<ul>
<li>Are great for your health</li>
<li>Have Protein</li>
<li>All come from a cow</li>
</ul>
Will make...
- Are great for your health
- Have Protein
- All come from a cow