Skip to main content

IMAGE Tags


The <IMG> tag is used to display graphics on web pages.
The main requirement for the IMG tag is the file name (“source”) of the image.
NOTE: Web page images DO NOT become part of a web page file. They are separate files 

and must be located in the same folder as the web page file unless otherwise noted.
Images: <img> tag
src
Location of image file (relative or absolute)
alt
Substitute text for display (e.g. in text mode)
height
Number of pixels of the height
width
Number of pixels of the width
border
Size of border, 0 for no border

Example:
<img src="./php.png" alt="PHP Logo" />

Width (WIDTH): is the width of the image in pixels.

Height (HEIGHT): is the height of the image in pixels.
Border (BORDER): is for a border around the image, specified in pixels.
HSPACE: is for Horizontal Space on both sides of the image specified in pixels. A setting 
                   of 5 will put 5 pixels of invisible space on both sides of the image.
VSPACE: is for Vertical Space on top and bottom of the image specified in pixels. A setting
                  of 5 will put 5 pixels of invisible space above and bellow the image.

Comments