Creating an image with a text description in HTML

Issue

Creating an image with a text description in HTML.

Solution

Adding title to the IMG SRC tag will display a message for the image as shown in the below code.

<img src="http://www.computerhope.com/chguy.gif" alt="Computer Hope guy holding CH logo" title="Visit Computer Hope">

The above example will display Visit Computer Hope over the image in all browsers. In the above example we also used the alt tag to describe the image. Although some browsers will also use this as a text description we recommend using alt to describe the image for search engines and the visually impaired and title for the hover text.

Example

Visit Computer Hope

Additional information

 

  • Category
  • HTML Q&A
  • Related pages
  • HTML Help
  • Solved?
  • Were you able to locate the answer to your question?