what is the purpose of scr and alt attributes of the<img> tag?
Answers
Answered by
4
the scr attribute defines the source of image from where the images is taken
img tag is uesd to add images in html document
the alt attribute is uesd to specify alternative text
img tag is uesd to add images in html document
the alt attribute is uesd to specify alternative text
Answered by
4
The <img> tag defines an image in an HTML page. The <img> tag has two required attributes: src and alt. Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.
SRC Attribute
Definition and Usage. The required src attribute specifies the URL of the image. Note: When a web page loads; it is the browser, at that moment, that gets the image from a web server and inserts it into the page.
ALT Attribute
The term "ALT tag" is a common shorthand term used to refer to the ALT attribute within in the IMG tag. Any time you use an image, be sure to include an ALT tag or ALT text within the IMG tag. Doing so will provide a clear text alternative of the image for screen reader users.
SRC Attribute
Definition and Usage. The required src attribute specifies the URL of the image. Note: When a web page loads; it is the browser, at that moment, that gets the image from a web server and inserts it into the page.
ALT Attribute
The term "ALT tag" is a common shorthand term used to refer to the ALT attribute within in the IMG tag. Any time you use an image, be sure to include an ALT tag or ALT text within the IMG tag. Doing so will provide a clear text alternative of the image for screen reader users.
Similar questions