imagetag
TRANSCRIPT
Post/display Image(s)HTML
HTML <img> tag
• Definition and Usage
The <img> tag embeds an image in an HTML page.
Notice that 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.
The <img> tag has two required attributes: srcand alt.
Syntax for defining an image:
<img src="url" alt="some_text"/>
HTML The Alt Attribute The required alt attribute specifies an alternate text
for an image, if the image cannot be displayed.The value of the alt attribute is an author-defined text:
<img src="boat.gif" alt="Big Boat">
The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the srcattribute, or if the user uses a screen reader).