I have been stressing the point that HTML is a
document structuring language and not a page layout language. However, since HTML controls the way your text is displayed by the browser it provides a number of tags for formatting. The key to using any of these tags is remembering that your document will be viewed on different computers and monitors by different browsers, so it will never look exactly the same.
In our first document, we have already used some formatting tags. The <P> and <BR> tags created breaks in the text, and the <B></B> and <I></I> pairs displayed text as bold and italics. Another pair (<U></U>) can be used to underline your text, although this can cause confusion since links are usually underlined by the browser.
You may want present some text (such as a quotation) as a separate block in order to have it stand out within your document. The <BLOCKQUOTE> </BLOCKQUOTE> tags can be used to indicate the beginning and end of such a section by indenting from both the left and right:
Here is an example of the block quote tag:<P>
<BLOCKQUOTE>
This is a paragraph of text set off from the rest of the
document by use of the block quote tag. In Netscape, this
text is indented from the rest of the document.
</BLOCKQUOTE>
After the block quote, the rest of the text will continue to
the left and right edges of the browser window.
This example would appear as:
Here is an example of the block quote tag:
This is a paragraph of text set off from the rest of the
document by use of the block quote tag. In Netscape, this
text is indented from the rest of the document.
After the block quote, the rest of the text will continue to the left and right edges of the browser window.
We have already seen how the browser uses HTML tags to control the format, ignoring line breaks and spacing. There may be times, however, when you want to control the spacing of your text directly. The tags
<PRE> </PRE> are for preformatted text. All line and character spacing within these tags will appear exactly as you type it:
Notice that you did not have to use line break tags for text within the preformatted tags.
One more formatting tag which was mentioned earlier allows you to center text. The tags are <CENTER> </CENTER>, and they can be used by themselves or in combination with other tags (such as bold, italic, or header tags):
Go back to your first document and use the
<PRE> </PRE> tags to add your name, address, etc. in the format shown in the example above.