Formatting Text With HTML

There are several ways to format text with html, often giving you a choice of methods.

You can use straight basic HTML tags, which are listed further down in this page. Basic tags include bold <b> and italic <i> and more specific elements such as <del> which defines strikeout text. There are about twenty of these tags, some very common, some not used very often. These tags tend to indicate the purpose of the text rather than a specific appearance. If you look at the list you will see that a lof of the tags look the same. These tags are easy to use and are designed to provide an easy way to generate cross platform text. the problem is that they don't give you very specific control over fonts, colors, sizes, etc. which we often do need to control.

<font> is a tag that can be used to set the details of a font, such as font face, size, and color. You can use the options face=, size=, color=.

For example, <font face="arial" size=20px color="red">Sample Text</font> looks like this:

Sample Text

Finally you can use CSS commands to redefine the font options. The css commands can be applied to an individual named piece of text (use the ID option) or they can be used to redefine a basic HTML tag, such as <H1> or <P>. The CSS commands can be stored in the header of your html file (if you only want them to apply to your current html page) or they can be stored as a separate CSS file. You can create the CSS rules by hand or you can use the features of Dreamweaver to create the CSS file.

 

 

HTML Text Tags

HTML Text Formatting Tags

Tag Definition Example
<b> Defines bold text
Bold Text
<big> Defines big text Text
<em> Defines emphasized text Emphasized Text
<i> Defines italic text Italic text
<small> Defines small text Small Text
<strong> Defines strong text Strong Text
<sub> Defines subscripted text Subscripted Text
<sup> Defines superscripted text Superscripted Text
<ins> Defines inserted text Inserted text
<del> Defines deleted text Deleted Text

HTML Computer Output Tags

<code>Defines computer code textCode text
<kbd> Defines keyboard textKeyboard Text
<samp>Defines sample computer codeComputer Code
<tt> Defines teletype textTeletype Text
<var> Defines a variableText Variable
<pre> Defines preformatted text
Preformatted Text

HTML Citations, Quotations, and Definition Tags

<abbr> Defines an abbreviationAbbreviation Text
<acronym> Defines an acronymAcronym Text
<address> Defines contact information
Address Text
<bdo> Defines the text directionText Direction
<blockquote>Defines a long quotation (indent)
Block Quote Text
<q> Defines a short quotationShort Text Quote
<cite> Defines a citationCitation Text
<dfn> Defines a definition termDefinition Text