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

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

Improving SEO Using Accessibility Techniques
Illustration by

Using and hiding section headings


From:

Improving SEO Using Accessibility Techniques

with Morten Rand-Hendriksen

Video: Using and hiding section headings

When you visit a site using a normal browser, it's usually easy to understand where and what the different sections are because of the layout and design of the site. Menus, content, sidebars, footers, and so on are all clearly separated and defined. When you visit the same site using a text-to-speech or a text-only browser, the experience is completely different. You no longer have visual cues as to where the section begins and ends, and you don't necessarily know what they are for. To fix this, we can add section headings and descriptions that are only visible or hearable when you're using a non-visual browser.
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

Using and hiding section headings

When you visit a site using a normal browser, it's usually easy to understand where and what the different sections are because of the layout and design of the site. Menus, content, sidebars, footers, and so on are all clearly separated and defined. When you visit the same site using a text-to-speech or a text-only browser, the experience is completely different. You no longer have visual cues as to where the section begins and ends, and you don't necessarily know what they are for. To fix this, we can add section headings and descriptions that are only visible or hearable when you're using a non-visual browser.

These headings and descriptions can then provide more information about the different sections. The reason why you want to add section headings is to provide information about each section for the non-visual browsers, so text-only or text-to-speech browsers. The accessibility benefit is obvious. These section headings define and explain separate sections, providing additional information to the person visiting the site. The SEO benefit is more hidden. By adding this information in, the search engines can see what content is on the page and also what sections are defined so that it understands the content more easily, because though the primary focus of the search engines and social networks is to index just the title and description tags, they also read the rest of the page, and adding these section headings will give the search engine further information about what's on the page.

Adding and hiding section headings is a two-step process. First, we go into the HTML page itself and add a section heading. So I will scroll down here to header navigation and then I'll add a section heading here. So I'll say h1, because this is a heading, and then I'll end my h1, just so it looks nice and clean, and then in here I will say, Main Menu. So now I have a heading that says Main Menu, so you can see that this is the main menu. I will also add a class to this so that I can style it.

So I will say class, and I will call that section heading. If I save this now and open the page in my browser, you'll see we now have a section heading here for Main Menu. The problem is, as I did that, I broke the layout of my site because now the menu shifted down, and everything looks weird. The next step is to hide this heading, so it only appears if we turn the CSS off. There are several ways you can hide content from a browser using CSS, but in this case I don't really want to hide it from the browser; I just want to hide it from the person looking at the content in the browser.

So instead of setting the display value to none, which means the text simply disappears and the browser can't see it, I want to take the text out of the context and shift it away from my screen, so I can't see it. So we will use absolute positioning to lift the text out of the stream of the rest of the content and then use a text indent to shift it all the way off to the left of the screen. To do this, I will open the styles.css file in Notepad and I will go down until I find my Global styles, and here at the very top I will add a new style for that class I just created.

So I will say class section-heading, and then first I will set the position to absolute, and I will just close this. If I save this and reload the page, you will see that now Main Menu has been taken out of the general stream of the content and just put all the way to the left. Now what I want to do is take the text and shift it so far to the left that you will never see it, no matter how big your screen is. So I'll go back, I will add another line, and then I will say text-indent, and then I will indent: -9999 pixels. That means the text will be indented 9999 pixels to the left of where it normally is, which means only if you have a screen that had 10,000 pixels of extra space to the left would you ever see the text.

When I save this and reload the page, you will see Main Menu is gone, but if I go into CSS and disable styles Main Menu is right there. That means if someone is visiting a site using a text-only browser or text-to-speech browser they will see the section heading for the Main Menu, but if they're using a regular browser that shows CSS, they don't see it. That was a section heading. We can also go further by adding another section like a description, and simply add that same style to it and that'll be shifted off too.

So we could go in to our HTML file, create a new div with the same class, we call it section-heading, and then write some text. Now when I save that, go back and reload, you'll see nothing changed when I am viewing it with CSS. When I disable the styles, we now also have description. By adding and hiding section headings and descriptions, you make it easier for people and search engines to navigate and understand your site without adding extra unnecessary content for those who have standard visual browsers.

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

Notes cannot be added for locked videos.

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.