g
Printer Friendly Version

editor  
BellaOnline's HTML Editor
 

How To Add An Image To Your Webpage

You can add an image anywhere on your webpage with the image tag and control the content next to it with the image tag attributes.

  • Image Tag

    To put an image on your webpage use the code below. Replace the image.gif with the name of the image you wish to use. If the image is in a subfolder put the name of the subfolder before the name of the image and separate them with a /.

    folder/image.gif

    Then replace the 0 with the number of pixels for the width and height of your image. Finally replace the identification with the identifying text for your image.
    <img src="image.gif" width="0" height="0"
    alt="identification">
    Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

  • Border Attribute

    To set the width of the border around an image, replace the 0 with the number of pixels you wish the border to be. The zero will cause the border not to show. Then place the code segment inside the <img> image tag.
    border="0"


  • Hspace Attribute

    Use the code below to set a blank/empty space on the side of an image. Replace the 0 with the number of pixels you wish the empty space to have. Then place the code segment inside the image tag.
    hspace="0"


  • Vspace Attribute

    Use the code below to set a blank/empty space on the top and bottom of an image. Replace the 0 with the number of pixels you wish the empty space to have. Then place the code segment inside the <img> image tag.
    vspace="0"


  • Align Attribute

    To control the alignment of the text next to an image replace the location with left, right, top, middle, or bottom. Then place the code segment inside the <img> image tag.
    align="location"



This site needs an editor - click to learn more!

HTML Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Editor Wanted for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor