•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 402,636 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,314 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Without using cascading style sheets or more complicated methods it is easy to introduce coloured text into your HTML sites/documents. This is done by using the <font> tag and its options. In addition to this the <font> tag is more backwards-compatible than most other style commands.
The way to do it is: <font color=#RRGGBB>your text here</font> where RR GG and BB are the colour componenets in hexadecimal. Try veiwing the following example
The way to do it is: <font color=#RRGGBB>your text here</font> where RR GG and BB are the colour componenets in hexadecimal. Try veiwing the following example
[CODE] <html> <head> <title>Multi-Coloured Text example ©1o0oBhP :)</title> </head> <body> <table> <tr><td><font color="#FF0000"><b>This is RED text</b></font></td><td><b><font color="#FF0000">RRGGBB = FF0000</font></b></td></tr> <tr><td><font color="#00FF00"><b>This is GREEN text</b></font></td><td><b><font color="#00FF00">RRGGBB = 00FF00</font></b></td></tr> <tr><td><font color="#0000FF"><b>This is BLUE text</b></font></td><td><b><font color="#0000FF">RRGGBB = 0000FF</font></b></td></tr> </table> </body> </html> [/CODE]
Comments (Newest First)
mmiikkee12 | Posting Whiz in Training | Aug 12th, 2005
•
•
•
•
<font color="crap"> makes a dingy brown...
anastacia | Junior Poster | Jun 21st, 2005
•
•
•
•
ACTUALLy the code for colours is in hexadecimal form but you can even put the color name
<html>
<body>
<font color="red"> this will be in red </font>
</body>
</html>
however it depends upon your browser not all browser support all colours
<html>
<body>
<font color="red"> this will be in red </font>
</body>
</html>
however it depends upon your browser not all browser support all colours
cscgal | The Queen of DaniWeb | Mar 18th, 2005
•
•
•
•
There is no need for code tags in the Code Snippets library. The language the code is written in determines how it's formatted.
1o0oBhP | Posting Pro in Training | Dec 24th, 2004
1o0oBhP | Posting Pro in Training | Dec 24th, 2004
cscgal | The Queen of DaniWeb | Dec 24th, 2004
•
•
•
•
I am still working on perfecting the engine which powers these code snippets. Not all languages are full supported, but I can assure you that I am working on it!
1o0oBhP | Posting Pro in Training | Dec 23rd, 2004
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)