HTML < img > Tag - Learn About Website | DaddyFile

0

HTML <img> Tag

Example

How to insert an image:

<img src="smiley.gif" alt="Smiley face" height="42"width="42">

Definition and Usage

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.
Tip: To link an image to another document, simply nest the <img> tag inside <a> tags.


Differences Between HTML 4.01 and HTML5

The following attributes: align, border, hspace, and vspace are not supported in HTML5.


Differences Between HTML and XHTML

In HTML the <img> tag has no end tag.
In XHTML the <img> tag must be properly closed.

Post a Comment

 
Top