• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 2. Working with Graphics > Assigning Names and <alt> Tags to Images

Assigning Names and <alt> Tags to Images

Names and <alt> tags are important, although largely invisible, parts of your Web pages. It is generally a good practice to assign names and <alt> tags, because they help both you and the users of your site. The functions of these elements are described in the following exercise.

Select the invlens_header.gif image and type header in the image name text field on the Property inspector.

The image name text field is not labeled on the Property inspector. It is located in the upper left corner, directly under the size of the image.

The name you assign to the image is an internal name, used mainly for functions such as Behaviors (covered in Lesson 5). Although naming your images is not essential, doing so is good practice. You should keep image names short, enter them in lowercase, and avoid using spaces or special characters.

Type Creating The Lights…from bonfires to lenses in the Alt text field.

The Alt option lets you specify text that will be displayed if users have graphics disabled, if their browsers are not capable of displaying graphics, or if a particular image fails to load. In this case, the text you have typed is the same text shown in the image.

You must add <alt> tags to any graphics that are critical for site navigation. Adding <alt> tags to other images is also useful, because if users have graphics disabled or are using a text-only browser, they will be able to see some of the information they are missing. Additionally, people with vision disabilities use a reader that voices the <alt> tags along with the text on a Web page. Further, <alt> text is displayed briefly in Internet Explorer when the user moves the pointer over the graphic.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint