HTML 3.2 by Example

We can easily change the font color of any single letter, word or paragraph in our document:

  <FONT COLOR="red">The</FONT>
  <FONT COLOR="orange">actual< /FONT>
  <FONT COLOR="darkgreen">contents </FONT>
  <FONT COLOR="green">of</FONT>
  <FONT COLOR="blue">the</FONT>
  <FONT COLOR="purple">document</FONT>

The actual contents of the document

 

Let's now add some horizontal rulers,

  <HR SIZE="10" WIDTH="60%">
  <HR SIZE="10" WIDTH="60%" ALIGN="left">
  <HR SIZE="5" WIDTH="250" NOSHADE>







 

And several differently aligned paragraphs with differently aligned section headings:

  <H1 ALIGN="left">Here goes a header of size 1</H1>
   <P ALIGN="right">This is a paragraph aligned to the right</P>
  <H3 ALIGN="center">Now goes a header of size 3</H3>
   <P ALIGN="left">This is a paragraph aligned to the left</P>
  <H5 ALIGN="right">And finally, a header of size 5</H5>
   <P ALIGN="center">This is a centered paragraph</P>

Here goes a header of size 1

This is a paragraph aligned to the right

Now goes a header of size 3

This is a paragraph aligned to the left

And finally, a header of size 5

This is a centered paragraph

 

We can also force line breaks into the text:

  Here's<BR>
  an<BR>
  example<BR>
  of<BR>
  that<BR>

Here's
an
example
of
that

 

Or, in contrary, we can cause the lines not to break:

<NOBR> The lines won't break even when they are so long that the right edge of the browser window is reached, where the text would otherwise wrap around. I don't see any immediate use for that, but I have to tell you about that anyway.</NOBR>

The lines won't break even when they are so long that the right edge of the browser window is reached, where the text would otherwise wrap around. I don't see any immediate use for that, but I have to tell you about that anyway.

 

Not only can we change the font color, but also its size and typeface:

  <FONT FACE="Arial" SIZE="3" COLOR="green"> This is</FONT>
  <FONT FACE="Courier" SIZE="2" COLOR="red"> an example of</FONT>
  <FONT FACE="Times" SIZE="5" COLOR="blue"> different font colors,</FONT>
  <FONT FACE="Algerian" SIZE="4" COLOR="cyan"> sizes, and faces.</FONT>

This is an example of different font colors, sizes, and faces.

Note that the font that you specify might not be available on a particular system, so it might be a good idea to provide a comma-separated list of 2-3 similarly looking fonts, i.e.

<FONT FACE="Verdana, Arial, Helvetica">If the first font from the list is not available on a system - the second one is chosen, if still not - the third one.</FONT>