Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Including lists

From: Up and Running with Bootstrap 2

Video: Including lists

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.

Including lists

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.

Show transcript

This video is part of

Image for Up and Running with Bootstrap 2
Up and Running with Bootstrap 2

32 video lessons · 19590 viewers

Jen Kramer
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

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.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Up and Running with Bootstrap 2.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

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

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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:

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:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.