Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Down here at the bottom of the page where it talks about Exhibit Halls A & B, we have a couple of lists--actually we have one list. Right now, it's a single bulleted list that talks about smart displays that will be occurring in Exhibit Halls A & B throughout the week. And then under that we have a sentence that says to visit three local photographers who will be displaying their works, and it says something like Sam Gilmore: Ocean photography. Currently, those are marked up as individual paragraphs, and that is actually rather incorrect markup. It's still a list of things, Sam Gilmore is the photographer, Ocean photography is his topic.
They go together, but they're not individual list items the way Area high school students or Roux Academy students or Conference participants are. The best way to mark up that particular laundry list of stuff down there at the bottom is really a definition list. A definition list is something that is not typically used a whole lot inside of web pages at this point in time, but it's incredibly useful. It's got a two-part list, so there's a definition term and a definition itself, so things can be paired together inside of a list.
So I'd like to have marked that particular group of items up correctly, and let's take a look at some styling that Bootstrap offers for dealing with lists. So inside of Dreamweaver, if you scroll on down to you the bottom of the page. I'm at line 62. First of all, let's take a look at that bulleted list. As you saw, those are displayed right now with individual bullets, if I wished. I don't have to display the bullets at all by taking this ul and adding a class of unstyled, and by adding that class of unstyled that will get rid of the bullets in the list.
So now if I refresh my web page, you see there is my list here under Exhibit Halls A & B, and the bullets on that list no longer exist. Now I don't think that works at all. I liked it much better as a bulleted list. I thought it was much easier to read that way; however, I wanted to be sure to tell you about unstyled, which is a class that you can use on both ordered lists, the ol tag and unordered lists, which is the ul tag. You, of course, could then layer other styling on top of your list once you've turned the bullets off via the unstyled tag.
Also note that it's gotten rid of the margin or the padding that goes around that list as well. So that's a pretty handy style to know about. I'm not going to use it on this page, but now you know that it exists. Okay, so back to Dreamweaver here. I'm going to take that class of unstyled out again. And then down here at the bottom is that group of photographers and their specialties. So let's go ahead and mark this up correctly. So any time you see something like this, you want to make use of a definition list, you always knew to start with the dl tag, which stands for Definition List.
And then down underneath the end of that, we're going to wrap that, so of course that /dl is required. Then we're going to have our first one here, Sam Gilmore. We'll change this paragraph tag to a dt, which stands for Definition Term. And Ocean photography we'll change to a dd which is the actual definition. And although we're not thinking of these as dictionary terms with definitions, these are again related pieces of content that are tied together, and by using dt and dd we are showing the association between those two items.
So we are going to ahead and change this markup here really quickly. Okay, so now I've got this all marked up as a definition list. So if I save this again, File > Save, and I put it into Firefox, you'll notice that we have a very nice style here, where we have the Sam Gilmore presented as a bold name and then underneath of it Ocean photography is slightly indented. So it's pretty clear that Ocean photography goes with Sam Gilmore, for example. So that's a very nice looking list.
There is another style that Bootstrap offers that you may want to make use of here as well. So if you go back to Dreamweaver, add here for the dl, simply add the class of dl-horizontal. And what that will do, as you might predict, will put the name over on the left and the occupation or interest over on the right. So if you save this page and put it into Firefox, Refresh, you'll see down here at the bottom of the page now that we have a list of photographers, they're still bold in with their interests over on the right side, which is also a very, very nice presentation.
So Bootstrap has a few treatments for lists. These are lists that are just your basic list, content list that I've showed here on the web page. There are additional options that are available for navigation, which is often marked up as a list. I'll be covering those in the next chapter on navigation.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.