• To display an image on a page, you need to use the src attribute.
• src stands for "source". The value of the src attribute is the URL of the image you want to display on your page.
• It is a empty tag.
<IMG SRC="URL">
<IMG SRC="picture.png'>
<IMG SRC="picture.png' height="300px" width="300px>
Image attributes - <img> tag
<img> Defines an image.
<src> Display an image on a page,Src stands for "source".
<alt> Define "alternate text" for an image.
<width> Defines the width of the image.
<height> Defines the height of the image.
<border> Defines border of the image.
<hspace> Horizontal space of the image.
<vspace> Vertical space of the image.
<align> Align an image within the text.
<background> Add a background image to an HTML page.
Post a Comment