
HTML Images
HTML Image Tag
You may add images in the .gif or .jpg file formats to your webpage. Check out the resources page for links to websites where you can download images in these formats for free.
To add an image you use the <img> tag. The <img> tag is an empty tag in that it has no closing tag.
The image tag has the following format:
<img src="location" height=50 width=50 alt="Welcoming Logo">.
The location gives the name and the location of the image. It is recommended to add height and width attributes to the img tag. These will allow the image to take proper proportions on a browser. The alt tag tells a person what the picture is, in case of an error while loading or the user has chosen not to view images.
Example: Try it out for yourself!
Examine the HTML code below. Cut and paste the following HTML code into the form window below and press the check it out button to see the resulting webpage.
<html>
<head>
<title>The Image Tag</title>
<body><h2><font color=#FFCC33>Website Creation Tutorial</h2>
<img src="separator_tugowar_1.gif" width=600 height=50 alt="Website Creation Tutorial Mascot">
</body>
</html>
Creating your own webpage
Follow these simple steps to create your own webpage and to view your created webpage in your browser.