How to Add a Space to an IMG SRC Tag
Add space to an "img src" tag in order to add space around an image you embed in a Web page. It's possible to use HTML elements to insert space to the left and right sides of an image, above and below it, or all around it using codes for both horizontal and vertical spacing. Even if you aren't proficient or comfortable with HTML coding, the small amount of coding required to put space around an image is simple to execute
Instructions
-
-
1
Log in to your site's "File Manager" and navigate to the HTML document for the page where you want to insert space around the image. Locate the embedded image HTML tag, which looks like this:
<img src="http://www.yoursite.com/yourpic.jpg"></img>
-
2
Insert space to the left and right of an image by inserting desired pixel values into the "hspace" attribute as follows:
<img src="http://www.yoursite.com/yourpic.jpg" hspace="10"></img>
-
-
3
Add space to the top and bottom of an image by inserting desired pixel values into the "vspace" attribute as follows:
<img src="http://www.yoursite.com/yourpic.jpg" vspace="10"></img>
-
4
Use both codes in combination to put space all around the image:
<img src="http://www.yoursite.com/yourpic.jpg" vspace="10" hspace="20"></img>
-
5
Save the HTML document. View the page in a new tab or window to assess the changes.
-
1