How to insert image in html
How to insert image in html
Q] What Is The Image Tag In HTML?
- The <img src=""> HTML tag is used to display an image on a web page .
- It is a self -closing tag.
- which means it does not need a separate closing tag
- The <img> tag use embed image in HTML page.
- Image are not technically insert in web page.
- image are linked to the web pages.
- The <img> tag is empty it contains attributes only and does not have a closing tag.
Syntax :-
<img src="image_path" alt="alternative -text" >
Q] What Are Image Tag.?
Image tagging is process of identifying and labeling the contents of an image tag
This can be done manually by someone looking at the image and typing in description/
automatically using machine
Html IMG Attribute :-
1] src :-
- src is use to specify the path to image.
- It is a necessary attribute that describes source or path of the image.
- It instructs the browser look for the image on the server .
- specifies the path to image.
2] alt :-- The alt attribute defines alternate text for image it cant be displayed .
- The value of the alt attribute describe the image information the image in words.
- The alt attribute is considered best /good SEO prospective.
3] Width :-
- width is an optional attribute which is used to specify the width to display the image.
- It is used to specify width of the image.
Height :-
- height is use to specify the height of the image
Syntax:-
<img src=" image-path" alt" image-info" width="image-width-put"
height=" image-height-put">
Program :-
<!DOCTYPE html>
<html>
<head>
<title>image html tag</title>
</head>
<body>
<h2>html tag </h2>
<img src=
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTU_
ej9ZY8Ee051iV1P0wHZhhlCLdN1nZfGZQ&usqp=CAU"
alt="nature" width="" height="">
</body>
</html>
Post a Comment