0% found this document useful (0 votes)
35 views1 page

HTML Image Tag Guide

The document explains the HTML <img> tag, which is a self-closing tag used to embed images in a webpage. It outlines the required attributes 'src' and 'alt', as well as optional attributes like 'width', 'height', and 'title'. An example of the <img> tag is provided to illustrate its usage.

Uploaded by

karthik m
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

HTML Image Tag Guide

The document explains the HTML <img> tag, which is a self-closing tag used to embed images in a webpage. It outlines the required attributes 'src' and 'alt', as well as optional attributes like 'width', 'height', and 'title'. An example of the <img> tag is provided to illustrate its usage.

Uploaded by

karthik m
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

HTML Images

img is a self closing tag

Syntax:

<img src="[Link]" alt="Description of image">

Attributes:

 src – (Required) The path to the image file (can be a URL or local
path).

 alt – (Required for accessibility) Text shown if the image can't


load.

 width and height – Optional, to set the image size.

 title – Optional, tooltip text on hover.

Example

<img src="images/[Link]" alt="A photo of a sunset" width="128"


height="128">

You might also like