Can someone tell me how to designate font and color using html?
![]() |
Can someone tell me how to designate font and color using html?
Check this out for an html dictionary...
http://www.freewebs.com/lemool/
XenoSapien
Quick reference:
For a font type, use <font face="FONT NAME HERE">Your text here</font>
For a font color, use <font color=ffffff>This is white text</font>
For both, just combine them: <font face="Ariel" color=000000>This text is black and the font style is ariel</font>
The best way to do that is to use style sheets. Embeded font tags are great but what happens if you use those to setup your site and then you decide you want to change the font from Arial to Verdana or something like that. Here's a quick and dirty example of a style sheet...
If you used font-tags to do the above you would have to change every font tag you use. Using style sheets you only have to change it in the styles you've defined... no matter where they're used.Code:<html>
<head>
<title>CSS Test</title>
<style>
.arialFont {
font-family: arial;
font-size: 9pt;
color: #0066FF;
}
.ouch {
background-color: yellow;
color: green;
font-size: 12pt;
}
body {
background-color: #eee;
font-family: arial black;
font-size:8pt;
}
</style>
</head>
<body>
This is what the normal text looks like from the body style.
<div class="arialFont">This is a test of the arial font style</div>
<div class="arialFont">You can also<span class="ouch"> EMBED </span>other styles.</div>
</body>
</html>
All times are GMT -7. The time now is 05:08 AM. |