<img src=”image.png” alt=”image description”>

The <img> tag is an empty tag, and as such does not require a closing tag. It uses the src attribute to specify the location of the desired image and, as with the link tag, you can use either relative or absolute paths here. It’s important to note that you must include the file extension at the end of the path.

The alt attribute is where we specify our alternative image text. This is used when the browser is unable to render the image (because of a slow connection, an error finding the image file or if the user is using a screen reader). It is also used to explain to search engines what your image is, so that it can then use the image in its search results.

Image size

By default an image will be loaded in its native dimensions.