Technoblog
Technical blog, HTML Tutorials, ASP Tutorials, JAVA Tutorials, Windows, Linux etc
Wednesday, 9 November 2011
Select Font Colours in CSS
The color property sets the color of the font
Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled 1</title> </head> <body style="background-color:black;"> <p style="font-family:Arial;font-size:20px; color:green;"> This is Green font </p> <p style="font-family:Arial;font-size:20px; color:red;"> This is Red font </p> <p style="font-family:Arial;font-size:20px; color:yellow;"> This is Yellow font </p> <p style="font-family:Arial;font-size:20px; color:purple;"> This is Purple font </p> </body> </html>
Result Will be :
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment