New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

Improving SEO Using Accessibility Techniques
Illustration by
Watching:

Creating an accessible menu with an unordered list


From:

Improving SEO Using Accessibility Techniques

with Morten Rand-Hendriksen

Video: Creating an accessible menu with an unordered list

Good navigation is vital for a website to work properly. If the user can't figure out how to navigate the website and get to the different sections, the site is basically useless. Website navigation usually takes the form of menus, and these menus can be created in many different ways. However, if you're coding with accessibility and SEO in mind, there's really only one way to do it right: all menus should be lists. If you think about a menu, it's really a list of links that point to something else.
Expand all | Collapse all
  1. 3m 3s
    1. Welcome
      1m 4s
    2. Using the exercise files
      1m 59s
  2. 8m 16s
    1. Accessibility and SEO: A primer
      4m 58s
    2. Understanding the benefits of accessibility and SEO
      3m 18s
  3. 11m 26s
    1. Experiencing an inaccessible web site
      6m 4s
    2. Experiencing an accessible web site
      5m 22s
  4. 16m 28s
    1. Evaluating screen readers for Windows and Mac
      5m 56s
    2. Installing browser development tools
      4m 8s
    3. Pretending to be a screen reader
      6m 24s
  5. 7m 40s
    1. Installing SEO tools
      2m 30s
    2. Understanding how search engines search a page
      2m 45s
    3. Comparing sites that are SEO-friendly with ones that are SEO-unfriendly
      2m 25s
  6. 44m 6s
    1. Defining a language for a page
      5m 4s
    2. Defining meta headers for a page
      6m 10s
    3. Creating better semantic markup with HTML5
      3m 13s
    4. Using and hiding section headings
      4m 56s
    5. Creating content hierarchies with heading tags
      5m 29s
    6. Emphasizing content in paragraphs
      5m 36s
    7. Making accessible block quotes
      3m 22s
    8. Using some new HTML5 tags
      4m 47s
    9. Using ordered and unordered lists
      5m 29s
  7. 22m 17s
    1. Marking up links properly
      6m 48s
    2. Marking up images
      7m 23s
    3. Creating a proper image header with CSS
      8m 6s
  8. 32m 43s
    1. Creating an accessible menu with an unordered list
      6m 16s
    2. Creating and hiding nav headings and skip navigation links
      6m 59s
    3. Giving navigation links proper focus with style
      4m 39s
    4. Creating an accessible drop-down menu
      10m 46s
    5. Scrapping drop-down menus for better options
      4m 3s
  9. 3m 44s
    1. Next steps
      3m 44s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Improving SEO Using Accessibility Techniques
2h 29m Intermediate Dec 06, 2011

Viewers: in countries Watching now:

This course focuses on two elements of web development: accessibility and search engine optimization (SEO), demonstrating why they are important and how they work. Author Morten Rand-Hendriksen also shows how good coding practices and modern web standards can make a site accessible and more visible to search engines and social networks.

Topics include:
  • Understanding the benefits of accessibility and SEO
  • Evaluating screen readers for Windows and Mac
  • Installing browser development tools
  • Comparing sites that are SEO-friendly and SEO-unfriendly
  • Defining a language for a page
  • Creating better semantic markup with HTML5
  • Marking up images and links properly
  • Creating an accessible menu with an unordered list
Subjects:
Business Web Accessibility SEO
Author:
Morten Rand-Hendriksen

Creating an accessible menu with an unordered list

Good navigation is vital for a website to work properly. If the user can't figure out how to navigate the website and get to the different sections, the site is basically useless. Website navigation usually takes the form of menus, and these menus can be created in many different ways. However, if you're coding with accessibility and SEO in mind, there's really only one way to do it right: all menus should be lists. If you think about a menu, it's really a list of links that point to something else.

Therefore, using a list to create a menu is quite logical. However, in the past, creating a list that displayed horizontally for instance was complicated, so therefore people used other means to create menus. But today there's no reason to do that. In fact, not using lists doesn't make any sense at all, because it's much easier to create navigation with lists than without them. The accessibility benefit of using lists for menus is that once you turn the Styles off, a list will display as a bullet or numbered list.

Therefore, they're easy to parse for the person visiting the site, even if they can't see the styling around it, and it's obvious that this is a list of links, rather than just a cluster of links. The SEO benefit is similar. Once you put menu items into a list, a search engine will see these menu items as a group and handle them accordingly. That means a search engine will pretty much understand that this is a menu and then treat these menu links with the attention they deserve.

If you've been following this course, and you've been making your own site based on the exercise files, this is the time to go grab the exercise files for this movie and pull them into your project, because I've made some subtle changes to the HTML and CSS, just to clean it up a bit. If you want everything to match exactly with what I'm doing, you have to move these files over, but if you don't care, you can just continue with the files you have. It's up to you. Going in and looking at the index.html file in the Notepad, you'll see we already have a set of lists, we have these menus.

We have the Main Menu, we have three sidebar menus down here, and we have a footer menu. Let's say I want to add a new menu at the top of my site. I can then create new menu using a list. So first I have to create a new widget, because that's how I structured my site, so I'll basically just copy what's down here. Because I'm using HTML5, I want to wrap all my menus in a nav element, telling the browser, this is navigation.

So I'll start with a nav tag and provide an ID, so I'll call this one firstWidget. And then I can also give it the class="widgets," so that all the styles that are applied to the other widgets are applied to this widget too, and then I'll close my nav tag, so that I don't forget it later. Inside my nav tag I can now add a list for a menu or a heading or both. In this case, I only want the menu, so I'll just start a new list.

I'll start an unordered list, and then close the unordered list. And inside here, I'll have all my list items that will become the menu items. So I'll start with creating a new list item and close it, and then inside that list item I want to put the menu items I'm going to use. So I'll create a menu item called Menu item 1, and then I'll create a new list item and call it Menu item 2. Then I'll create a third one and call it Another menu item.

When I save this and I open the site in my browser, as you now see a new menu on the side, as you can see right here, that displays as a list. Now you'll notice that none of the styles from the menu below carry over. That's because the styles that styled this menu to look the way it does are actually attached to the anchor tags, not to the list tags. That's because when I designed this site, I wanted it to be so that I didn't have to click on the text itself to go to the link, I just needed to hover the mouse anywhere inside the area that that menu item contains.

So to trigger these effects we need to add an anchor tag to each of our menu items. So I'll simply go in here and inside the list item, I'll create an anchor item, set the href to pound for now. Then it points to the current site. And give it a title, and I'll just say Menu item 1. And I'll close the a tag on the other side, save it, and now I can test that one Menu item to see if it works, and it does.

As you can see, I've now borrowed the same styling that's applied to the other menu items at the new menu at the top here. So to apply to the other two items, I just do the exact same thing again, a href="#" title="Menu item 2" and then end the a tag, and finally, the last one. What you're seeing here is that all of these things that I have been talking about throughout this course are starting to come together.

We're working with lists, I'm attaching links to the list items, I'm attaching title attributes to all the links, so they make sense for the browser, for the search engines, and for the person visiting them, and because I'm using lists as menus, they're automatically displaying as lists. So when I now save this new menu, reload the page, you'll see I have a menu that works the same way as the other ones do, and if I go and turn the Styles off and scroll down, you'll see my new Menu appears as a list in my content.

By putting your navigation menus in lists, you not only make them easier to access for your visitors, but they also become easier to manage for you. Adding or subtracting a menu item becomes a matter of adding or subtracting a list item.

There are currently no FAQs about Improving SEO Using Accessibility Techniques.

 
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.
Upgrade now


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 Upgrade now

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 Improving SEO Using Accessibility Techniques.

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

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.