Images
Adding Images
< img >
To add an image into the page you need to use an < img > element. This is an empty element (which means there is no closing tag). It must carry the following two attributes.
src
This tells the browser where it can find the image file. This will usually be a relative URL pointing to an image on your own site. (Here you can see that the images are in a child folder called images
alt
This provides a text description of the image which describes the image if you cannot see it.
Height & Width of Images
-
height: This specifies the height of the image in pixels.
-
width: This specifies the width of the image in pixels.