How to Make the Alt Attribute in HTML

When programming a Web page in the hypertext markup language, certain tags, such as the image tag, use the "alt" (alternative) attribute. The alt attribute is the parameter that defines the text replacement for something. For example, if an image doesn't load, or if you roll your mouse over an image, a text box will appear displaying the "alternative" text. It is important to use the alt attribute for search engine optimization.

Instructions

    • 1

      Open a Web page in your preferred coding editor; if you do not have one, you can open it in Notepad.

    • 2

      Locate the image tag that you want to make an alternative text link for.

    • 3

      Add the following parameter, replacing "TEXT" with the text you want to add:

      alt="TEXT"

      An example image tag would be:

      <img src="image.jpg" alt="The Alternative Text" />

Related Searches:

References

Comments

Related Ads

Featured