HTML Image Tag
8 March, 2021
No Comments
HTML Image Tag
How to insert a image in html?
Tag to set image border html?
I want to set image in both left and right ends in the same line?
Explanation
Image Tag:
To insert a image in your a page we need to use the tag “img” with its attribute “src”
Example Code:

Result :

Here we assume that we have the image file in the same directory of the html file.
We can also give the full path of the directory as
Example:

Width and Height:
We can resize images that are displayed in web pages using the attributes width and height.
Example Code:

Result :

Alignment:
We can align the image using the attribute “align”.
The attribute takes values left or right or center.Example :


Result :


Borders:
We can set border around images using the attribute “border”. This can be used to create a space around the picture.Example :

Result :
