- Besides controlling the size of the text, you will also want to
control the placement of the text. In HTML placing text is very, very
difficult because the language is meant to describe formatting, not
layout. For example, since HTML does not really pay attention to
white space, you cannot simply tab groups of text over.
- However, there are a few tags that you can use for basic layout
that are discussed in the following table.
| Opening Tag |
Closing Tag |
Description |
| <CENTER> |
</CENTER> |
Centers the text between the tags |
| <BLOCKQUOTE> |
</BLOCKQUOTE> |
Indents the text between the tags |
| <NOBR> |
</NOBR> |
Specifies that the browser should not word wrap the text within the
tags. |
| <PRE> |
</PRE> |
Specifies that text should be displayed as pre-formatted text. This
tag was not exactly meant to be used for positioning text, but it can
be. In fact, many web designers have created some very nice ASCII art
sites using this tag. Check out Crystal
Water's Page for a great example. |
- The following HTML code demonstrates how you might use these tags
<HTML>
<HEAD>
<TITLE>Text Positioning</TITLE>
</HEAD>
<BODY>
This is normal text
<CENTER>This is centered text</CETNER>
<BLOCKQUOTE>This is blockquoted text</BLOCKQUOTE>
<NOBR>This is <NOBR> text that will
not stop even when the browser wants to word wrap</NOBR>
</BODY>
</HTML>
- The following figure shows the above HTML in the browser's window.
- Notice that both the <CENTER> and the <BLOCKQUOTE> tags
have an embedded new line character in them although this is browser
dependent last I checked.
Layout Resources
Previous Page |
Next Page
|