HTML Image
- The
tag is used to insert image in web page.
- It is an empty tag, means it does not have end tag.
<img src="url" alt="some_text">
Example:
<img src="http://www.careerride.com/images/new/logo.png" width="200" height="100" alt="CareerRide Info" align="left">
Attributes of <img> tag
| Attributes | Description |
|---|---|
| vspace | Specifies the amount of space to the top and bottom of the image. |
| hspace | Specifies the amount of space to the left and right of the image. |
| alt | Specifies alternate text for an image when image is not found. |
| src | Indicate the source file. |
| border | Specifies the thickness of border. |
| width and height | Specifies width and height of the image. |
| align | Use to set horizontal alignment of the image. (left, right) |
| valign | Used to set vertical alignment of the image. (top, bottom) |
Example: Image <img> tag
<!DOCTYPE html>
<html>
<head>
<title>HTML Image Example</title>
</head>
<body>
<img src="http://www.careerride.com/images/new/logo.png" width="200" height="22" alt="CareerRide Info" align="right">
</body>
</html>
Output



