Apu
September 17, 2022 .
#alt
.
#Attribute
❌
5 attributes for an image in HTML
To embed an image in an HTML page, The <img> tag is used. The <img> tag has some attributes.
- src - Specifies the path to the image.
<img src="https://app.3schools.in/logo.png">
The src attribute is required to display an image. - alt - it is used to specify the alternate text for an image. It is shown when the image not displayed.
<img alt="logo">
Try it Yourself » - height - Specifies the height of an image.
<img height="200">
- width - Specifies the width of an image.
<img width="200">
- loading - all images are not loaded as soon as someone visits your website.
<img loading="lazy">
save
listen
AI Answer
5 attributes for an image in HTML
0
To embed an image in an HTML page, The <img> tag is used. The <img> tag has s…
asked
Apu
0 answers
2915
To embed an image in an HTML page, The <img> tag is used. The <img> tag has s…
Answer Link
answered
Apu