How to add an image using html

Written by laurel storm Google
  • Share
  • Tweet
  • Share
  • Email

A picture is worth a thousand words, or so the adage goes, and pictures can certainly add colour and visual interest to an otherwise plain website. Adding an image to a page using HTML is simple, requiring the use of only one tag, <img>.

Skill level:

Other People Are Reading


  1. 1

    Note the image's height and width in pixels.

  2. 2

    Upload the image to your webhost and make a note of its URL.

  3. 3

    Place the following code within your webpage's HTML where you want the image to appear. Replace the example URL, height and width with your image's actual URL; the "alt" attribute should contain a short description of the image itself.

    <img src="" alt="Example image" height="35" width="10" />

Tips and warnings

  • Although the "height" and "width" attributes are not required, using them will allow browsers to reserve a space for the image even if it has not yet loaded, keeping your page's layout static.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.