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:
Note the image's height and width in pixels.
Upload the image to your webhost and make a note of its URL.
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="http://www.example.com/image.jpg" 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.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for