Home Lessons LAMP HTML/CSS PHP MySQL JavaScript YouTube Blog PHP Fiddle

Intro to HTML: alt attribute

Quick Copy Boxes

The alt attribute is set equal to text that you want to display, incase an image file does not display.

At the bottom of this page there is a code editor pre-loaded with the lesson's code.

Image alt


<img src="rainyDay.jpg" alt="It is raining today.">

            

src The user's web browser will first try to display rainyDay.jpg.
alt If the web browser can not display the image, it will display this text instead.

!-- Side bar-->
Color Selector



Hex:


RBG:



If you find my tutorials helpful, please consider donating to support my free web development resource.

The more money I raise, the more content I can produce.

Thank you,
Commander Candy

DONATE