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

Marking up images


From:

Improving SEO Using Accessibility Techniques

with Morten Rand-Hendriksen

Video: Marking up images

The Internet is a fantastic medium for sharing images, but unfortunately, not everyone can see these images. That includes people with vision problems, search engines, as well as people who use browsers that have images turned off or can't display images for some other reason. For people who can't see the image, the web experience can be a dull and often confusing one if no information about the image is provided. That's what the alt attribute is for. When you add an image to a web page, you are usually doing it as an illustration or to convey some message.
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

Marking up images

The Internet is a fantastic medium for sharing images, but unfortunately, not everyone can see these images. That includes people with vision problems, search engines, as well as people who use browsers that have images turned off or can't display images for some other reason. For people who can't see the image, the web experience can be a dull and often confusing one if no information about the image is provided. That's what the alt attribute is for. When you add an image to a web page, you are usually doing it as an illustration or to convey some message.

The alt attribute in the image tag provides that message in text format so that people can understand it and search engines can understand it. What is really important here is that the alt attribute is required for web standards compliancy; that means if you add an image and you don't add an alt tag, your code is invalid. It needs to be there. The alt tag needs to be in every single image tag for the code to be valid. The accessibility benefit of adding an alt tag is pretty obvious. When you add an alt tag, you are adding a text description of the image, meaning if you can't see the image you see the text description instead, and if you're accessing the website using a text- to-speak browser, you get that text description read back to you.

The SEO benefit is directly related to the accessibility benefit because the search engine cannot see your image. The search engine relies entirely on your alt description to understand what this image is, so that it can be indexed properly. That means if you provide a good description of your image, the search engine will understand what it is. Unfortunately, some people use this to try to up their search engine ranking. They put in images in their pages and stack them with alternate descriptions that often have little to do with the article and have nothing to do with the image itself.

This might seem like a good idea, but the search engines are on to them, and this will actually hurt your search engine ranking quite dramatically. So when you add an alt description to your images, make sure that you do it properly and that you actually describe the image. The image markup looks a lot like the anchor markup, with a couple of small modifications. You start with the image tag. You then add the source attribute which points directly to the image. This is because the image itself doesn't live on your page; the image lives somewhere else and it's called in through a hyperlink.

So in this case, I'm using a root relative link to point to an image called morten.jpg in the Images folder. Then you add the alt tag. The alt tag is simply alt= and then inside quotations marks you type out the description of the page. And then inside the quotation marks, you type out the descriptions of the image. When you have done all this, you close the tag, because the image tag doesn't wrap around anything, since it's only bringing an image in. Depending on the function of the image on the page, what you put in the alt variable will vary.

If the image contains information that is pertinent to your article or the image itself is descriptive, we use the alt tag to describe the image or describe how it relates to the article. If the image is inside a link element, so when you click on the image, you follow a link, the alt variable describes the link target. In other words, the alt variable and the title variable from the link should be the same. Finally, if the image is added as decoration only and has no relation to the topic and no relation to anything else in the page, you should still add the alternate description variable, but you leave it empty.

So you type out alt= and then just two quotation marks. That way the browser will know, here is an image, it has no value to the story, so I will simply ignore it. In our example project we have four images: one big image at the top of the story that relates to the story and three images that link out to other places. Now we can go and change the markup so that all these images validate and have the correct markup. So I'll go in and open index in my Notepad, and then I will find my images.

The first one is in the first part of my paragraph. You find it here, inside the figure tag. It says image class="center" and then we have the source link to the image itself, but we don't have a title. So here I will add a title describing the image. In this case the image is "Yellow Pansies in a pot outside a house." I will end the image tag and now when I save it, I can go and open the page in my browser and when I hover my mouse over the image, you will see we get that message, "Yellow Pansies in a pot outside a house." That also means that the search engine will now index that image as Yellow Pansies in a pot outside a house, instead of just an image.

Looking at the images below, you will see that these images point to another source, and based on the rules about how to use the alternate tag, we now have to match the alternate description of each of the images to the title tag of the links that are pointing elsewhere. So I will go back to my markup and find these images and then I will copy out the title variables and add them to the alt variable in the images. So I will copy this one, and then say alt equals, and I will paste it in.

And then I will do it for this one and for the last one. Now this might seem like doing twice the work for the same results, because as you saw, before I added the alt variables, when I hover over the image, I can see where it's pointing.

Now the reason why you need to do this has nothing to do with the link; it's because you need to provide information about the image itself and its relation to the rest of the content on the page, regardless of whether or not it's wrapped in a link. So the fact that it's wrapped in a link and that the link has a title tag has no impact on the image itself. The image still needs an alternate description. When I reload the page, it doesn't seem like there's any difference, because we still get the same message. The difference only kicks in if something goes wrong with this page.

For example, if I go in and I right- click on the image and go to Inspect Element, and I break the link to the image-- let's say, for instance, it wouldn't load from the server or something like that-- if I go in and take this link out, you will see that in its place, we get the description of the image itself. And because this image was a link, the link now wraps around this text description. Without the text description we wouldn't see this link, so we would have an empty spot without a link and no way of following that link anywhere.

Though the alt attribute is required when posting an image on a web page, it's often overlooked because images work even without the attribute. Adding the alt attribute to your images ensures that they get indexed properly by search engines and that non-visual users can still glean the information they contain.

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.