Question:

How to put a space in html? ?

by  |  earlier

0 LIKES UnLike

i want to place a tiny pic on my site and another picture next to it...but how do i put a space so it would look nice? pls help on html code

 Tags:

   Report

3 ANSWERS


  1. <img style="width: XXpx; height: YYpx; border: 0" src="path to image one" alt="Text Description"><img style="width: XXpx; height: YYpx; margin-left: XXpx; border: 0" src="path to image two" alt="Text Description">

    Set margin-left to how much spacing you want.  Set width/height to actual image sizes.

    If your image on right slips under the left one, then the container you have them in is not wide enough.  If styled, it will have to be widen to accommodate both images.

    Ron


  2. The best way is to add the hspace and vpsace attributes to the html code. The example below will put a 10 pixel whitespace around the image.  hspace does the horizontal spacing and vspace does the vertical spacing.

    <img src="/path/to/image.jpg" hspace="10" vspace="10">

    http://fantasai.tripod.com/qref/HTML4/im...

  3. & nbsp ;

    but all next to each other...

    yahoo answers would let me post it normally

    but

    <img src="URL" hspace="10" vspace="10">

    would also work

    hspace and vspace space the image from other context itself. Very useful in this situation.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions