top of page

IMAGES

We can add images to our content using:

  1. the img tag 

  2. the src attribute 

  3. width & height attributes. 

Some important things to remember about the img tag and its attributes:

The img tag is self-closing

Like the <br> tag, because the image tag encloses no information, it doesn't need a closing tag. 

Width & Height attributes

The width and height attributes are necessary.

If they are excluded, the browser will calculate the size as the image loads, instead of when the page loads

The layout of the document may jump around while the page is loading.

images demo
images demo output
bottom of page