How do I create multicolor links in HTML?
There are a few different ways of doing this, for anyone interested in doing this the proper way we suggest using the CSS solution, since the font tag is a deprecatedtag.
CSS solution
Code
The first and proper method of doing this would be to use CSS to define your color and then use them later in the actual link. In the below code example, you would place the below CSS code into the <HEAD> portion of your web page and define the two color names and colors using HTML color codes.
<style type="text/css">
.blue {color: #00f;}
.green {color: #008000;}
</style>
.blue {color: #00f;}
.green {color: #008000;}
</style>
Next, is the actual link containing span tags that used the above CSS defined colors within the link.
<a href="index.htm"><span class="green">Computer</span> <span class="blue">Hope</span></a>
Example
HTML font tag solution
Code
<a href="index.htm"><font color="green">Computer</font> <font color="blue">Hope</font></a>
Example
No comments:
Post a Comment