Spacing in HTML

admin

Administrator
Staff member
Hi all,<br />
<br />
I'm very new to HTML and have a question about spacing. <br />
<br />
How do you space between paragraphs and other objects in HTML? For example, how would I design my site so there are 3 or 4 lines between the title of my page and the first paragraph or item? All I know how to do is place a bunch of <br> tags. I'm pretty sure this isn't the correct way to accomplish this.<br />
<br />
Thank you very much for your help.<br />
<br />
Chad<!--content-->Use the tag <P>. It starts a new paragraph, but doesn't indent.<br />
<br />
Hope I answered your question.<br />
<br />
--Jen<!--content-->Thank you for the reply. I knew of the <p> tag but how can I create more of a space than <p> will give me?<br />
<br />
Thanks again for the help.<!--content-->There is nothing wrong in using the <br> tag. I actually prefer it, it keeps the code a little cleaner. By all means there are other ways like using <p>content</p>. You might even want to consider tables if you are trying to place images and text creativly. <br />
<br />
If I can suggest anything, try not to soley rely on one tag, experiment and use each tag where you feel it is suited best.<br />
<br />
I might be wrong but you are possibly newish to this... I would suggest forking out 20-30 English Pounds for a decent HTML 4.0 bible.<!--content-->BR tags are a good usable tag to use but... some browsers may see a bunch of them and just render the first two. But that all depends on the browser and version. Cant really recall exactly which one(s) does that.<br />
<br />
Besides, having too much space between stuff tends to make a rather long page with, well, too much space :)<!--content-->ok...there are a few ways to go about this...<br />
<br />
1.You have the <br> break tag -- ie. (breaks a line of continuous text and prevents text alignment around images)<br />
code: <br />
"blah<br>blah"<br />
output: <br />
"blah<br />
blah"<br />
<br />
2.You have the <p> paragraph tag -- ie.(which is the same as "blah<br><br>blah"). (indicates a paragraph)<br />
code:<br />
"blah<p>blah"<br />
output:<br />
"blah<br />
<br />
blah"<br />
<br />
3.You have the <blockquote> blockquote tag -- ie. (this code is generally used for the beginning of paragraphs, giving the paragraph and indent)<br />
code:"<blockquote>blah blah</blockquote>"<br />
output:<br />
" blah blah"<br />
<br />
4.You have the nbps; nonbreakspace -- ie. (this gives spaces in areas that the space bar can't give you.) (This is good to use on navigation areas)<br />
code:<br />
"nbsp; blah"<br />
output:<br />
" blah"<!--content-->I believe you could also use the <pre></pre> tags, and just put in the carriage returns in between. But I go with the <br> tags.<!--content-->if you're still looking for workarounds, there are a few methods you could use.<br />
<br />
a spacer image could be used between lines. use a transparent gif image (usually 1x1 pixels and resized)<br />
<br />
<br />
heading<br><br />
<img src=http://www.htmlforums.com/archive/index.php/"spacer.gif" width="1" height="10"><br><br />
body text<br />
<br />
<br />
you could also experiment with css, to play with the line spacing of your text. <br />
<br />
<br />
<html><br />
<head><br />
<style><br />
.huge {line-height:40mm}<br />
</style><br />
</head><br />
<body><br />
<p class="huge">heading</p><br />
body text<br />
<br />
<br />
or just use images for your page titles with a largish gap at the bottom.<br />
<br />
i agree with entimp though, <br> tags are the way to go for spacing and clean code.<br />
<br />
--jackhammer<!--content-->
 
Back
Top