Joel Diharce
Posted on September 1, 2022
Ordered lists
So, I can't help myself... As an ADHD brain, I need lists, and ordering them is crucial since our brains have trouble with prioritization, so I was obviously happy to find out how to use ordered lists in HTML. ;D
According to the videos, ordered lists are described as a way to present lists in a clean and presentable/consumable way. There are two sets of open/close tags that we use to make an ordered list.
First there are the <ol>
tags, which wrap around the items that make up the ordered list. The <ol>
tags define the beginning and ending of the whole ordered list.
Second, the <li>
tags, which wrap around the individual items of the list. These define what text is in each item on the list.
Example time!
Here is the code as written:
Shopping list:
<ol>
<li>Dog toy for my dog</li>
<li>Squeaky toy for me</li>
<li>Treat for my dog</li>
<li>Whole cake for me, because I am an adult, and <strong>no one</strong> can stop me anymore >:D </li>
</ol>
Here is the code as I intend the user to view it:
Shopping list:
- Dog toy for my dog
- Squeaky toy for me
- Treat for my dog
- Whole cake for me, because I am an adult, and no one can stop me anymore >:D
Yes, the list is real. Don't judge me. ;P
On to the next lesson!!!
Posted on September 1, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.