HTML
|
JavaScript
Alignment
Basics
Character Codes
Colors
CSS
DIVS
Forms
Frames
Links
Lists and Bullets
Meta Tags
Multimedia
Pictures
Spacing
Tables
Text
Adding Text
Align Text
Marquee
Text Color
Text Font
Text Headers
Text Links
Text Size
Text Spacing
Text Styles
Text Color
237
Color for Specific Text.
Description
The tag looks like <FONT COLOR="#xxxxxx">. The starting tag is <FONT COLOR="#xxxxxx"> and the closing tag is </FONT>. The xxxxxx stands for the color code. The text between these two tags is the text that is the selected color. An example of this is:
Code
<font color="#00ff00">
I'm green!
</font>
Output
I'm green!
Practice
<font color="#00ff00"> I'm green! </font>
Color for All Text
Description
The other option is to set the default color of the text, so you don't have to specify it each time like in the Normal technique. The default text tag looks like <BODY TEXT="#xxxxxx">. This tag replaces the normal <BODY> tag. Here is an example of the default text color technique:
Code
<body text="#00ff00">
I'm always green!
</body>
Output
I'm always green!
Practice
<body text="#00ff00"> I'm always green! </body>
Link Color
Description
The normal way to set the color of the link, is to put the color tag around the selected text that is within the link tag. The tag looks like <FONT COLOR="#xxxxxx">. The starting tag is <FONT COLOR="#xxxxxx"> and the closing tag is </FONT>. The xxxxxx stands for the color code. The text between these two tags is the text that is the selected color. An example of this is:
Code
<a href="file.html">
<font color="#ff0000">Click Here</font>
</a>
Output
Click Here
Practice
<a href="file.html"> <font color="#ff0000">Click Here</font> </a>
Visited Link Color
Description
A visited link color is the color a link is if you have previously visited it. The tag to set the color for the visited link is <BODY VLINK="#xxxxxx">. This tag replaces the normal <BODY> tag. Here is an example of the visited link color tag:
Code
<BODY VLINK="#0000FF">
<A HREF="file.html">
Click Here
</A>
Output
Not Displayed
Practice
<BODY VLINK="#0000FF"> <A HREF="file.html"> Click Here </A>
Active Link Color
Description
An active link color is the color a link turns when you click on it. The tag to set the color for the active link is <BODY ALINK="#xxxxxx">. This tag replaces the normal <BODY> tag. Here is an example of the active link color tag:
Code
<body alink="#0000ff">
<a href="file.html">
Click Here
</A>
Output
Not Displayed
Practice
<body alink="#0000ff"> <a href="file.html"> Click Here </A>
Combining the Tags
Description
As you may have noticed, many of the tags above replace the <BODY> tag. However, you are not allowed to have more than one <BODY> tag. Because of this, there is a way to put all of the tags into one single tag. This is done, simply by combining them all and dropping off the BODY part of the tag. So the completed tag would look like:
<body text="#xxxxxx" link="#xxxxxx" vlink="#xxxxxx" alink="#xxxxxx">
Code
<body text="#000000" link="#0000ff" vlink="#ff0000" alink="#00ff00">
Normal Text
<P>
<a href="file.html"> Link </a>
</body>
Output
Not Displayed
Practice
<body text="#000000" link="#0000ff" vlink="#ff0000" alink="#00ff00"> Normal Text <P> <a href="file.html"> Link </a> </body>
Advertisements