|Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login|
HTML Image Tag Tutoral
Browser SupportThe 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.
Check out SEO for YOU now!
Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
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 ]
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects