HTML Image

The <img> tag creates a holding space for the referenced image.Closing tags are not used in HTML image element.

  • The <img> tag defines an image in an HTML page.
  • The <img> tag has two required attributes: src and alt.
  • HTML img Tag Example

    <!DOCTYPE html>
    <h2>img example</h2>
    <img src="logo.png" alt="logo" width="100" height="100">

    © copyright 2017-2022 Completedone pvt ltd.