BW Network
    Login | Register 

Stats
4 visitors online
Guests: 4
Registered: 0



SafeSurf Logo

Website BuildingTutorials → HTML: Using Images (Part 5)

Images are a very important part of any website, the one you are looking at now is full of them! They make websites more interesting, normally more attractive and often are useful for selling a product. After all, if you can see a picture of something you are probably 10x more likely to purchase it that having just looked at a text description...

The basic image code:

<img src="sampleimg.gif">

More attributes include:

<img src="image1.gif" border="0" height="50" width="50" alt="picture description here">
A sample Image!

Remember links have no closing tag! You can also combine links and images as follows:

<a href="food.html"><img src="sampleimg.gif" border="0"></a>

Note: If you do not define the width and height of the image in the '<img>' tag it will display the image at its actual size.


Floating Images:

The image here has been floated to the right of the text for a nice wrapping effect. It was done using: <img src="sampleimg.gif" style="float:right">

I have begun this paragraph with the <p style="clear: right"> so that it is not part of the above float, this is how to end a 'floated section'.

→ Lists, lists & more lists! →


  1. Introduction
  2. The Basics
  3. HREF Linking
  4. Colors & Backgrounds
  5. Hexadecimal Color Codes
  6. Using Images
  7. Lists, lists & more lists!
  8. Tables
  9. More HTML Tags!