Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Easy Style tag question

Posted on 2001-06-26
5
Medium Priority
?
188 Views
Last Modified: 2013-12-03
If this is put in a web page :
BODY { font-family: somefont } and the user's system does not have a somefont font, what will the browser display, assuming that this selector is at the top of the hierachy?
0
Comment
Question by:panrob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Accepted Solution

by:
CF_Spike earned 200 total points
ID: 6229614
The user's browser will display the default font for that browser. You can however, use a list of fonts to try to catch all possiblities. The first font in the list will be tried first, then the second and so on. If you wanted to use Arial, you could do something like this to give the maximum coverage for your users:

Style="font-family: Arial, Helvetica, sans-serif"

Always put the most generic font at the right hand side of the list.

There is no limit to the number of fonts you can use, but 3 or 4 well chosen ones are normally sufficient.

More information is available here:
http://www.w3.org/TR/REC-CSS2/fonts.html#font-family-prop

Spike
0
 

Expert Comment

by:Nostradom
ID: 6230631
If you want to be sure that the user has the font you use, type like CF_Spike described. I just wanted to add that PC-users 'always' have Arial, Verdana and Mac users 'always' have Helvetica, Verdana. Verdana is therefore a very popular font.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6231207
Mac users won't 'always' have Verdana. It's one of the fonts MS apps install, and there are lots of Mac users that don't have any MS apps -- I know many designers who use older systems and don't have IE, or much of ANYTHING MS -- and if they use Word, it's 5.0, which didn't load any extra fonts, if I remember correctly. And on top of that, there are lots and lots of Mac users that trash any fonts that MS installs, or turn them off in ATM/Suitcase/FontReserve/whatever font utility they use.

Mac users WILL have Geneva -- they have to, it's a system font. Mac system fonts are normally Geneva, Chicago, Monaco, New York. No matter how old or crappy the Mac, or what OS version they use, they'll have those fonts.

But they won't necessarily have Verdana... ;-)
0
 

Author Comment

by:panrob
ID: 6231322
Great comments again from everyone thanks.
0
 

Expert Comment

by:Nostradom
ID: 6234271
Ok webwoman, i give up ;)

But it would be nice if everyone had verdana. I like that font!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question