[skip nav] www.ackadia.com
ant worker


« Crash guide to HTML. Lesson 6 - adding images »

...


Previous lesson     Back to lesson index     Next lesson




cut----------------------------------------------


<html>
<head>
<title>Ackadia - Learn HTML - lesson 6 - adding images</title>
</head>

<body background="stone.jpg">

<img src="images/spidersweb.gif" width="75" height="75" alt="Spiders Web" name="Drawing of a spider in a web" />

<br /><br />
The picture or image can be anything really as long as it's in .jpg .gif though .png and even .bmp are valid in a number of browsers now.
<br /><br />
Unlike the "background" earlier, this picture is stored in the "images" sub directory for easier management.
<br /><br />
Really you can get away with just "img src='images/spidersweb.gif'" but it loads faster with the size put in and the "alt" is for weapon with text browsers or images turned off. The name="" is not essential, but adds toward XHTML compatibility, especially in regard to acessibility issues.
<br /><br />
Note the " /" at the end? This again is for XHTML code and is backwards compatible.
<br /><br />
Next we'll center the image. <br /><br />

</body>
</html>


cut----------------------------------------------



See this code running in your browser