HTML Images:
<img> tag is used to place image in a webpage.
The <img> tag is empty which means that it contains attributes only and it has no closing tag.
The <img> tag element is an inline element (it does not insert a new line on a page).
Attributes of <img> tag:
- SRC = URL – Stands for “source”. Specifies the name of the image file to be used.
- Align = bottom | middle | top | right | left
- Width = Width of image in pixels.
- Height = height of image in pixels.
- Name = reference of image.
- Alt= alt text is used to tell the details about the image to search engines. This also helps in accessibility issues of images in the website.
- Title= message to be displayed on mouse over on image.
- Border = border size for image.
- Style= to provide the CSS properties.
- Hspace=horizontal space between the image and other content.
- Vspace= vertical space between the image and other content.
- Usemap = name of the image mapto be applied on the image.
Eg:
<html>
<head>
<title>HTML Images</title>
</head>
<body bgcolor=”cyan”>
<h1 align=”center”> HTML Images</h1>
<img src=”image/im3.jpg” width=”200″ height=”200″ align=”center” alt=”company logo” title=”company logo image” hspace=”50px” border=”10″ name=”my image”>An Image
</body>
</html>
To Provide Favicon for browser: