HTML Codes?
What's the code to change text color in html body?
Public Comments
- i dont know it but if you type in a search engine "html text color code pink" or anyother color you'll find TONs of codes for it.
- Check out this site.
- <font color="red">this text will be red</font>
- <font color="#1A2F44"> is an example of a code by which you can change font color. Remember that 1A2F44 in the above code is a hexadecimal number and each 6 digit hexadecimal number will give you a different color. 1A in the above example tells the amount of red. 2F in the above example tells the amount of blue. 44 in the above example tells the amount of green. The browser shows the color which is formed by mixing these three colors. In decimal number system (the number system which is most common) there are ten different digits---0 1 2 3 4 5 6 7 8 9---but in hexadecimal system there are 16 different digits---0 1 2 3 4 5 6 7 8 9 A B C D E F.
- You can use CSS, which is becoming the standard now, rather than the font tag. Just put the following code between the <head> and </head> tags. You can change the color to any RRGGBB color. (#00ff00 would be all green with no red or blue) <style type="text/css"> .red {color: #ff0000;} .gray {color: #cccccc;} </style> Then in your main page, you would write <span class="red">this is red text</span> or <span class="green">this is green text</span>.
Powered by Yahoo! Answers