Maddog's HTML for Real People Chapter 5, Solution

Copyright 1997 ...[ view copyright info ]...
Ch 5 - Example Solution
HTML Source Code Follows:

<HTML>
<HEAD>
<TITLE> Mystery Colors </TITLE>
</HEAD>
<BODY BGCOLOR="#000000">
<CENTER>
<FONT SIZE=+2 COLOR="#808080">Mystery Colors</FONT>
</CENTER>
<P ALIGN=CENTER>

<!-- notice that in the source code, we've placed a line break inside the font tag -->
<!-- so that we didn't have a mile-long line of code -->
<!-- if we had broken outside the tag, we might have caused an unwanted -->
<!-- space in the displayed text at the browser -->

<FONT COLOR="#000000">XXX</FONT><FONT 
     COLOR="#000080">XXX</FONT><FONT 
     COLOR="#0000FF">XXX</FONT><FONT 
     COLOR="#0080FF">XXX</FONT><FONT 
     COLOR="#00FFFF">XXX</FONT><FONT 
     COLOR="#00FF80">XXX</FONT><FONT 
     COLOR="#00FF00">XXX</FONT><FONT 
     COLOR="#80FF00">XXX</FONT><FONT 
     COLOR="#FFFF00">XXX</FONT><FONT 
     COLOR="#FF8000">XXX</FONT><FONT 
     COLOR="#FF0000">XXX</FONT><FONT 
     COLOR="#800000">XXX</FONT><FONT 
     COLOR="#000000">XXX</FONT>
</BODY>
</HTML>

(End of HTML Source Code)

For demonstration purposes, I've provided a link to a file just like what we see above. When your done admiring it, just click the "back" or "previous" button of your browser to return to this page. OK, Let's see it work!

By the way, you may have done the 'XXX' line slightly differently if you "nested" font tags; then that portion would have looked something like this:

HTML Source Code Follows:


<FONT COLOR="#000000">XXX<FONT COLOR="#000080">XXX<FONT 
     COLOR="#0000FF">XXX<FONT COLOR="#0080FF">XXX<FONT 
     COLOR="#00FFFF">XXX<FONT COLOR="#00FF80">XXX<FONT 
     COLOR="#00FF00">XXX<FONT COLOR="#80FF00">XXX<FONT 
     COLOR="#FFFF00">XXX<FONT COLOR="#FF8000">XXX<FONT 
     COLOR="#FF0000">XXX<FONT COLOR="#800000">XXX<FONT 
     COLOR="#000000">XXX</FONT></FONT></FONT></FONT></FONT>
</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT>

(End of HTML Source Code)

Both solutions are valid; either way, you should have remembered to use one closing '</FONT>' tag each opening tag


-PREVIOUS- -CHAPTER- -INDEX- -NEXT-

Overseer: Monty Northrup ... maddog@io.com ... leave e-mail ...
...to maddog 'n' miracles homepage...