HTML Basics

 

Learn how to use HTML (hyper-text markup language) to add styles, colors, different sized fonts and text alignment to emphasize words or phrases in your questions, answers, instructions and section text.

You format text by surrounding the word or phrase with an opening 'tag' and a closing 'tag.' The opening tag starts the formatting; the closing tag stops it. The tags consist of special keywords or codes enclosed in 'less-than' (<) and 'greater-than' (>) symbols. A closing tag often begins with a slash (/).


Text Properties

The following are samples of the possible text properties:

To make text bold, enclose the text with the <b> </b> pair.
To make text italic, enclose the text with the <i> </i> pair.
To make text underlined, enclose the text with the <u> </u> pair.
To make text subscripted, enclose the text with the <sub> </sub> pair.
To make text superscripted, enclose the text with the <sup> </sup> pair.
To make text blink, enclose the text with the <blink> </blink> pair. (Note: this attribute is not recommended and does not work in all web browsers.)


Text Sizes

Change the size of text using the pair, where n=1 to 7.

This line uses <font size=1>
This line uses <font size=2>
This line uses <font size=3>
This line uses <font size=4>
This line uses <font size=5>
This line uses <font size=6>


Text Colors

Change the color of text using the <font color=color-code></font> pair, where color-code is the name or hexadecimal valur for the color.

To make the text maroon, enclose the text with the <font color=maroon> </font> pair.
To make the text green, enclose the text with the <font color=green> </font> pair.


Text Alignment

The following are samples of the basic possible text alignments:

By default, text will be aligned left.

To make text centered, enclose the text with the <center> </center> pair.

 

< Back to Code Fragments and Scripts

 

 


 
 
 
 
 
 

Copyright © 1999-2004 Hostedware Corporation.
All Rights Reserved.