HTML Image

    1100593 VIEW 1 0

Images enhance visual appearance of the web pages by making them more interesting and colorful.

The <img> tag is used to insert images in the HTML documents. It is an empty element and contains attributes only
The <img> tag is empty, it contains attributes only, and does not have a closing tag.

The <img> tag has two required attributes:

  •     src - The path to the image
  •     alt - An alternate text for the image.

 <img src="https:////hyper.mirganj.in/f1/FzZbPTOXU4wYbXba1MOS.jpg alt="Html">
Tip: Screen reader is a software program that reads  alt attribute code, and allows the user to "listen" to the content. and alt attribute help  to reached to reached engine.  Screen readers are useful for people who are learning disabled or visually impaired

Image resize

The width and height attributes are used to specify the width and height of an image. The values of these attributes are interpreted in pixels by default.


<img src="https:////hyper.mirganj.in/f1/FzZbPTOXU4wYbXba1MOS.jpg" alt="Html" width="500" height="600">
<img src=" https:////hyper.mirganj.in/f1/FzZbPTOXU4wYbXba1MOS.jpg" alt="Html" style="width:500px;height:600px;">