Adding an ALT Attribute to the IMG Tag

by David Watson

You can, if you want, add a text alternative to an image in HTML view. Don't worry, this is quite simple. All you need to do is add an ALT attribute to the IMG tag. ALT is short for alternative and IMG is short for image.

To add a text alternate to an image in HTML view, follow the steps below:

  1. Starting in Normal view, click the image to highlight it.
  2. Click the HTML tab to view the HTML code.
  3. Look for the IMG tag that defines your image, it should automatically be highlighted for you and it looks something like this:
  4. Position your cursor after the height attribute and type in the attribute name and the message using the appropriate syntax. When you have done this, the IMG tag should look like this:
  5. Click on the Preview tab and move your mouse pointer over the image. The text you added to the ALT attribute will appear at the cursor position.
  6. Click on the Normal Tab to return to the normal editing view.

See, I told you working with HTML wasn't difficult!

Return to Tutorial