I honestly thought that I had written a blog already that covered html lists, but apparently not. I know that I have shown a couple of you some tips and tricks, but now I will formally get this written for you guys.
Essentially there are two types of lists that a web browser reads. They are: ordered <ol> and unordered <ul>. You would use an ordered list if the items are sequential (1,2,3, ... A,B,C ... i, ii, iii). Unordered lists are bullet points. Here are some examples of ordered and unordered lists:
How to make toast: | Why online learning is good: |
---|---|
|
|
And in case you are wondering what the code for those above lists looks like:
You'll notice that what you are seeing up above is actually a 2x2 table with some cell spacing and no border. The lists are in quadrants III and IV.
To any list there are two parts: the list definition, <ol> or <ul>, and the list item, <li>. The former is what tells the browser "hey, we're going to be having a list over here". The latter is saying "okay, this is one of the items". If the list is an ordered list, then it knows to call the first <li> 1, and the second and third <li>'s 2 and 3. Later in this post I will walk you through what to do if you want the list to instead be sequential differently (e.g. A,B,C). If the list is unordered, <ul>, then each <li> is interpreted as just a bullet point, though you can specify what those bullet points look like.
So again, here are the basic components of an html list:
|
You can see that whether bullet points or numerical, the code for the two types of lists are very similar. There is a third type of list that we most likely will not use in eCollege. It is a definition list. I have only used this one time, and it was while creating the TCS Style Guide. If you are in a position where you need to create a glossary or a dictionary-like list, let me know and I will walk you through it. Most likely you'll want to just use Articulate Engage and do something fun and flash-based.
So now on to the different types of ordered lists. This is actually very easy and is best shown:
Numbered list:
Letters list:
Lowercase letters list:
Roman numbers list:
Lowercase Roman numbers list:
|
There is also a little flexibility when it comes to unordered lists:
Disc bullets list:
Circle bullets list:
Square bullets list:
|
If you want to know more values that can be used in lists, check out the official web standards guildelines: W3C. This is a whole lot of information and is a good stopping point. But...since we're on a roll, let's keep going. Now that you pretty much have a general idea of how to create a list, let's go ahead and trick out our lists. Some questions you might have:
- Can I have a list within a list?
- Can my ordered list go backward (like a "countdown")?
- Does my ordered list always need to start with 1,2,3...or can I start with 10,20,30 (for example)?
- Is it possible to create a multi-column numbered list?
Can I have a list within a list?
Absolutely. I would not encourage nesting right away until you are comfortable looking at the html. All those <li>'s, </ol>'s, </ol>'s, can blur together, but if you think you can handle it, then go ahead. Within a <li> you can start a new list. Here is an example of someone out and about running errands.
|
Notice that if I include a nested list, I don't close the <li> until the nested list is complete. So the list within Costco reads:
in reality the original list only has three items: costco, whole foods, restaurant. But each item has a list within it. When the lists become complicated, it is a good idea to organize them with indentations like I did above. In reality, web browsers do not care how many spaces there are between elements. The web browsers understand to be the equivalent of a space. Thus, I could write that Costco list as:
<li>Costco<ul><li>eggs</li><li>meat</li><li>diapers</li></ul></li>
and it would still render the same. In fact, that's exactly how the browser interprets my code before translating it for the viewer. Moving on to the next question:
Can my ordered list go backward (like a countdown)?
Easy. Let's look at David Letterman's top 10 signs you are obsessed with facebook.
|
Does my ordered list always need to start with 1,2,3...or can I start with 10,20,30 (for example)?
The clever ones among you will have figured out that the answer to this question involves the same technique as the answer to the last question. In fact, this is also how you can continue ordered lists after you have interrupted them. Just because I am lazy and tired of writing lists, I will recycle that last list.
This would represent a "break" in the list. Notice that in the code I closed the list prior to this paragraph, and created a new list post-paragraph
And another break in the list.
|
Is it possible to create a multi-column numbered list?
Short answer: yes, there are several ways to do that. However, this question was really a cliff-hanger question, because columns will involve css, which we will learn later.
Final thought and example is that this blog post should really be able to get you started making lists and not having to rely on the wysiwyg editor, which often does a great job of screwing up everything. Know that there are a great many things that you can do to lists via css. I'll leave you with a creative example of using css with a list. This example is in the course PRI300M. The SME authored four FO's for this particular unit, and assigned a handful of readings that correlated with each FO. She asked me to make a list that was specific enough so that students would know which readings went with which FO. This is the list I created and the code that I wrote:
-
- When Does TV Become DS?
- Can you count on having a captive audience?
- NAB, pgs. 50-54
-
- 1219.DS, What Retailers Think
- LUTA, pgs. 11-12, 33-34
-
- 1189.DS: Has the Time Come for Retailers to Adopt This Emerging Technology?
- 1149.In-Dealership Network Enhances the Harley-Davidson Lifestyle
- Transforming the State of Mind of Air Travelers in Cyprus
- NAB, pgs. 114-117
-
- 1180.Leveraging Emerging In-Store Technology
- NAB, pgs. 114-117
- RM, pgs. 111-118
- Top Dayparting Tips for Hospital DS
I hope this was insightful. Don't be afraid to dive into the html editor to make your lists from now on!
Comments
Post a Comment