Video: Creating lists

Most people think of lists as simply a way of displaying related items in a numbered or unordered listing, well that certainly is true but list can do so much more than that. Lists allow us to group related content together and then structure that content in a way that denotes importance, rank or similarity. When used for navigation, lists offer a way to group links together so that user agents know that all of those links are related. So if you've ever looked at the code of a page and you wondered why in the world would somebody take their menu and place it inside of a list. That's why? They're basically telling user agents that hey, these links belong together and they're related to each other.

Discover how to build web sites, prototypes, and more in this course on Adobe Dreamweaver CS6. Author James Williamson shows designers how to take control of their site by properly naming and structuring files and folders; how to create new documents and web pages from scratch or with starter pages; and how to add content such as text, images, tables, and links. James also provides a background on the languages that power projects built in Dreamweaver—HTML and CSS—and introduces the programming features in the application, for developers who want to dig right into the code. The last chapter shows how to finesse your project with interactive content such as CSS3 transitions and Spry widgets.

Creating lists

Most people think of lists as simply a way of displaying related items in a numbered or unordered listing, well that certainly is true but list can do so much more than that.Lists allow us to group related content together and then structure that contentin a way that denotes importance, rank or similarity.When used for navigation, lists offer a way to group links together so that useragents know that all of those links are related. So if you've ever looked at thecode of a page and you wondered why in the world would somebody take their menuand place it inside of a list. That's why?They're basically telling user agents that hey, these links belong together and they're related to each other.

So HTML offers us three main types of lists:Ordered, Unordered, and Definition Lists.Ordered and Unordered Lists are the two most common types, so we're going totake a look at those first.So I have the programs.htm file open here from the 04_04 directory and it's kindof right where we left it in the last movie.If I scroll down for example I can see that the only thing that it lacks sortof a really defined structure are these choices right down here. We have a listof academic links that are going to sit up there in one of the sidebars alittle bit later on.

So I want these items to be related to each other in some way, right now they're not.They're all just separate paragraphs so there's nothing to tell any type ofuser agent that these items belong together. Well a list is a perfect structure for that.So what I'm going to do is I'm just going to go ahead and highlight all of theseelements, each one of them, and then making sure that I'm in my PropertiesInspector looking at the HTML properties, I can see that right here, just likeWord or any other Word Processing program, I have the option of creating anUnordered or an Ordered List.I'm going to go ahead and create an Ordered List, and as soon as I do that, I notice that I get numbers 1 through 13, and there are all my choices.

So again, this is sort of a way of grouping them together and whether you use anOrdered or Unordered List is largely up to you.Numbered lists are good for when you need to denote a specific order or ahierarchy of elements, whereas, Unordered Lists are really good for just grouping related items together.Now there's really not much difference between the two to be quite honest with you, and I'm going to switch over to Split Screen view to show you what I mean by that.You'll notice that if we go over to Split Screen view and we focus on the codeof our list, you can see right here we have an opening ol tag for Ordered Listand we have a closing ol tag, and then each of the elements inside of it isinside an li or that's what's known as a List Item.

So we have all these list items inside this Ordered List.So how difficult is it to go from an Ordered List to an Unordered List?Well, obviously we could just simply click a button down here in the PropertiesInspector, but if you're working with a code it's actually pretty darn easy too.You'll notice for example if I change this ol to a ul, in both the opening andthe closing tags, and I click back over in Design view, we go from an OrderedList to an Ordered List so that's how similar they are.They're amazingly similar.Each of these lists will have options that are specific to the list.

For example, if I click back on the list itself and take this back to being anOrdered List, which is an ol, if I click on the list itself, you can see that ifI click inside one of the list items I have this little option for list items here, and I can change the entire list itself, so I can change it to say aBulleted List or a Numbered List.I could change the Style, so if I don't want a Number, if I want alphabet smallor Roman numerals that sort of thing, and I can also change where this starts at, so you have a lot of options that you can change here.

Now as soon as you do that what you're going to notice is what you really doingis setting attributes within the list itself, and some our list types are goingto have more attributes than others.For example, for Unordered Lists, let me go back to our ul, the only attributesthat I have really got here are a type, which allows me to choose circle disk orsquare, so if instead of bullets, if I just want the squares, I can come in anddo an unordered list and do squares like that.Now of course, this is really only going to work for you if you want the liststructure itself to be visible.

A lot of times through CSS, you're going to strip out all the default list formatting.You're going to do away with the margins and padding, you're going to do awaywith the bullets, you might substitute your own custom icons through CSS or youmight do away with the numbers, just so, you can sort of group this contenttogether and then style it however you want.So keep in mind that for the most part what you're looking at when you'reworking with list is you're looking at grouping related content together.Okay, so that covers Ordered List and Unordered List.In our next movie we're going to take a look at a third type of list that youcan create within Dreamweaver and that would be a Definition List.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.