search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Image Tag Tutoral

Browser Support

Internet Explorer Firefox Opera Safari Chrome

The image tag embeds an image on a web page. Amazing, ain't it?

The image tag has two required attritbutes, the image source and alt text. Including the width and height are recommended but are not required attributes. Here's how to code an image with only the required attributes:

<img src="imageName.jpg" alt="alternative text">

Replace imageName with the actual name of your image and be sure to use the correct image extension, (jpg, gif, or png for online use). The image name and extension are case sensitive. That means FOX.jpg is not the same as fox.jpg or fox.JPG or FOX.JPG.

If you keep your images in a different directory from your HTML pages you need to include the correct path to the images. For example, if you keep your images in a folder named images and this images folder is in the same folder as your HTML pages, the correct path would be: images/imageName.jpg.

The alt tag allows you to provide a text description of the image for text-only browsers and people who surf using screen readers.

Here's a sample image tag with the width and height added:

<img src="box.jpg" alt="red box" width="51" height="71">

Based on your interest in this tutorial you might also be interested in:

This concludes the HTML Image Tutorial.
Back | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)