How to Use Text for IMG SRC
Hypertext Markup Language is used to add elements such as images, tables, text and background pictures to a website. You can add pictures to a Web page using the "<img>" tag. The <img> tag includes an attribute called "alt," short for alternative. "Alt" adds alternative text to a picture that a visitor can view if images are disabled in the browser or if the visitor hovers the mouse cursor over the image. You can use alternative text in <img> to add additional comments to a picture or to ensure that the viewer is aware of the missing content when reading the Web page with images turned off.
Instructions
-
-
1
Insert "<img src="">" into the HTML code to add an image to the page. Insert the image URL between the inner quotation marks.
-
2
Add "alt="<insert text>"" to the <img> tag. Replace "<insert text>" with the desired text. For example:
<img src="http://www.mywebsite.com/dog.jpg" alt="A picture of a border collie jumping over a fence">.
-
-
3
Test the page after uploading your changes. Hover the mouse over the image to see the alternative text.
-
1
Tips & Warnings
You can also use the "title" attribute to add mouseover text to an image. For example:
<img src="url" title="this is the title text">).