Add Images to your Website

You can add images to your website by using the img element, and point to a specific image's URL using the src attribute.

An example of this would be:

<img src="">

All img elements must have an alt attribute. The text inside an alt attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.

Lets add an alt attribute to our img example above:

<img src="" alt="Author standing on a beach with two thumbs up. ">

Note that in most cases, img elements are self-closing.

Try it with this image:

Get a hint