Image Tag in HTML
Image Tag in HTML
The HTML <img> tag is used to add images inside the webpage/website.
Nowadays website does not directly add images to a web page, as the images are
linked to web pages by using the <img> tag which holds space for the image.
The <img> tag has two required attributes:
src – It specifies the path to the image
alt – It specifies an alternate text for the image if the image for any reason
cannot be displayed on the webpage.
Syntax of image tag:
<img src=”” alt=”” width=”” height=””>
<img src=
"https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png "
width="420" height="100"
alt="Geeksforgeeks.org">
</body>
<img src=
"https://media.geeksforgeeks.org/wp-content/uploads/
geeksforgeeks-13.png"
width="420" height="100"
alt="Geeksforgeeks.org"
style="border:5px solid black">
</body>