Font Styles

dumb question but I can not get my web page to appear in Arial without putting "font face=arial" in each line of code. Isn't there an easier way to have the text on a page appear in a particular font unless you change it at a specific spot?<br />
<br />
I do not use style sheets and thought you could do the above within the body tags but it will not work for me. Should I use "font style="" instead???<!--content-->What you should do is use a stylesheet. Insert this into your <head><br />
<br />
<style type="text/css"><br />
body<br />
{<br />
font-size: 10pt;<br />
font-weight: normal;<br />
font-family: Arial;<br />
}<br />
</style><br />
<br />
This should change the default to 10pt Arial...<!--content-->1 - You should never use points for anything that goes to the screen. Screens work with pixels and browsers simply do not know how many pixels a screen has to the inch. They just guess. Instead use pixels, or better yet, leave the sizes the way the user wants or needs.<br />
2 - You should always specify a default, generic font-family. Id est: font-family:Ariel, sans-serif<!--content-->Ok lt m get this straight. <br />
<br />
Pyro your saying I should use a style sheet even though my web site has no style sheets any where in it? Also doesn't this creat problems with browsers other tan IE (for xample NetScape)??<br />
<br />
Charles I understand the part about points versus pixels and I prsume " font-family:Ariel, sans-serif " has to be insterted into the <style> </style> tags some where. Is this correct?<!--content-->Charl3es thanks I re read your reply and figured out what you here saying about the "font-family: ariel, ....." <br />
<br />
Is there a scale for font sizes versuses pixels? I mean does 10 pixels = font 4 in html?<!--content-->Originally posted by r1012 <br />
Is there a scale for font sizes versuses pixels? I mean does 10 pixels = font 4 in html? <br />
<br />
There is no such exact scale becuase they are implemented in different manners in different browsers. A browser will usally fall into one of the following cathegories.<br />
<br />
* A pre CSS browser ("random" scale value)<br />
* A CSS1 browser (1.5 x scale between each size keyword)<br />
* A CSS2 browser (1.2x scale between each size keyword)<br />
<br />
In short, don't bother with trying to figure out the scalevalue, it won't work cross OS/browser anyway.<br />
In stead use % for font-size, leaving the main text of the page at size 100% and just set the size of things you want smaller or larger then the main text.<!--content-->
 
Back
Top