
HTML Tips and Techniques
Paragraphs and Line Breaks
Since spaces and hard returns are normally ignored by HTML, how do you put breaks between your paragrphs? You do this with special commands.
First, the paragraph. To insert an empty line between two paragraphs, you separate them with the paragraph marker. That is a P. So if you wanted two paragraphs to stay separate, put a <P> between them. That would look like this:
This is the first paragraph. Isnīt it a nice paragraph? It has lots of words in it. Itīs such a nice paragraph that I think it should never end.
This is the second paragraph. Itīs also a very nice paragraph but maybe not as nice as that first one was.
If you just want to move down to the next line, without leaving a blank space, you would use a BR, or line BREAK. You can do that for example with a list of items, like this:
carrots
tomatoes
celery
asparagus
apples
Each of those items in the list has a <BR> after it.
The third formatting command to know is the FORCED SPACE. Normally HTML will compress more than one space into a single space. So if you typed in
-SPACE--SPACE--SPACE-SPACE-cat
thinking it would put the word īcatī over further to the right, it would just turn it into
-SPACE-cat
when it displayed it. This is because it assumes the other spaces were just for you to be able to read your HTML more clearly.
If you actually want to force those spaces to show on the screen, you would use
& nbsp;
(without the space between the && and the n) which is the code for īspaceī. So you would do
& nbsp; & nbsp; & nbsp; & nbsp; cat
However, donīt use spaces to line things up. Spaces are proportional, meaning they arenīt always the same size. Use tables to line up text - you can learn about tables next!
Lisa's HTML Tips and Techniques Homepage
Other Sites by Lisa
ASP Code & Help Java Code & Help Gaming Walkthroughs