Text Formatting and Alignment

Bold, Italic, and Underlined

<body>
<b>This text is bold</b>
<br><br>
<i>This text is italic</i>
<br><br>
<u>This text is underlined</u>
</body>

<b>...</b> Any text contained within these tags will become bold.
<i>...</i> Any text contained within these tags will become italic.
<u>...</u> Any text contained within these tags will become underlined.

Fonts

<body>
<p>
<font face="verdana" color="#333333">This text is font face verdana, and gray.</font>
<p align="center">
<font face="times new roman" color="blue" size="3">This text is times new roman, blue, size 3, and aligned to the center.</font>
<p align="right">
<font size="2">This text is size 2</font>
</p>
</body>

<font>...</font> You use this tag to make your text something other then default.

You can use the font tag to make your text unique, by setting the font face, size, or color. You can even make rainbow text!

size
Defines the size of the text. It can be 1-7. 1 is the smallest, 7 is the largest.
face
Defines the actual font that you would like to display if this font is installed on the users computer. You are allowed 3 font choices separated by commas. If the user does not have the first font installed, then the computer will go to the second choice, and then the third. If none of the fonts are installed, then the default will be displayed. The only way to guarantee the font that will display is to make it a graphic.
color
Defines the font color in either a real supported name or RGB / HEX value. Supported names are: black, white, red, green, blue, yellow, aqua, fuchsia, gray, lime, maroon, purple, navy, olive, silver, and teal. You can see the Color Codes page for more names. (More > Color Codes [under the "Reference Material" section])

Special Characters
The best way to insert special characters such as the © symbol, or the « left angle quote is to use the proper ISO Entities. If you wanted to make a <, for example, you would type &lt;.

For a complete ISO chart, see the reference section, located under "More!".

More Text Formatting Tags
The following is a list of more tags you can use to format your text.

<b>
bold text
<i>
italic text
<u>
underscore
<tt>
typewriter
<s>
strikeout
<em>
emphasizes a word (with italic or bold)
<pre>
preformatted text
<dfn>
definition
<strong>
strong text
<address>
123 blah st.
anytown, ky, 39394
<cite>
used for quoting text
<code>
monospaced font
<samp>
monospaced font
<big>
one size bigger...
<small>
one size smaller.
<sup>
makes text superscript
<sub>
makes text sub script
<abbrev>
abbreviation
<acronym>
denotes acronyms
<person>
denotes a name for indexing purposes
<q>
denotes a short inline quotation
<var>
denotes a variable
<blockquote>
indents text from both sides

Special Notes
Preformatted Text
The <pre> tag will make text appear monospaced, and it will make it show up exactly how you type it.

You can use the pre tag to do t     h    i    s.

With the pre tag, what you type is what displays, including carriage returns.

Teletype
The <tt> tag is just like the <pre> tag, but it will not format your text exactly how you type it. The text will only appear monospaced.

The <div> Tag
When you want to align a pagragraph of text, you just place the align attribute in the <p> tag. But, this just aligns one paragraph at a time. When you want to align large amounts of content you can use the <div> ... </div> tags.

For example, let's say I had this document:

<h1>A Header</h1>
<p>
Some text....
</p>
<p>
Some More text...
</p>

If you want that entire set of information to align to the center, you can use the align attribute in the div tag like this:

<div align="center">
<h1>A Header</h1>

<p>
Some text....
</p>

<p>
Some More text...
</p>
</div>

The <span> Tag
<span> and </span> are dummy tags. they do nothing except specify a range of text to apply any style attributes that you add. The difference between <div> and <span> is <div> forces a line break, <span> doesn't. You could use <span> to modify the style of a short portion of text.

Refer back to this section when you dive into CSS.

Main?