Add an Image with HTML5

Images are linked to HTML pages using the <img> tag and requires the attributes src and alt.

 <img src=“mug_webmikester.jpg” alt=“” height=“375” width=“600”>

The src attribute specifies the URL of the image. The alt attribute provides alternative information for an image. If the image can not display for any reason, a browser will display the alt text. Screen readers also read the alt text.

Width and height attributes specify the images size in pixels. Using the style attribute will prevent internal or external styles sheets to change the original size of an image.

 <img src=“mug_webmikester.jpg” alt=“Mug of” style=“width:600px;height:375px;”>

You can use an image as a link by nesting the <img> tag inside the <a> tag.

<a href=””><img src=“mug_webmikester.jpg” alt=“Mug of” style=“width:600px;height:375px;”></a>