Cronthenoob Posted August 4, 2006 Share Posted August 4, 2006 I got this warning with the CSS validator:Line : 10 font-family: You are encouraged to offer a generic family as a last alternative.How do i offer a generic family? Link to comment Share on other sites More sharing options...
murfitUK Posted August 5, 2006 Share Posted August 5, 2006 You can put any font in the font-family tag but if the user's computer doesn't have that particular font their browser will just use a default one. Its simple to give a list of alternatives by putting them in a list: font-family: 'Comic Sans MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;The browser starts at the first font then moves down the line until it gets to one that's installed on the computer. You need to specify because what's installed on a Windows machine might not be installed on a Mac machine and vice versa.If you want to see your browser's default font , just leave out a font-family tag and see what it looks like.Generics are things like serif, san-serif, monospace, cursive and fantasy. If you use these terms the browser will use an installed font that resembles it:sans-serif -> resembles Times New Roman (windows) or Times (mac)serif -> resembles Arial (windows) or Helvetica (mac)monospace -> Courier New (windows), Courier (mac)cursive -> Zapf-Chanceryfantasy -> WesternWhile most computers have a standard set of fonts installed, you shouldn't assume it to be the case - and your web page which looks nice on your computer might look completely different on someone elses if they don't have similar fonts installed. Link to comment Share on other sites More sharing options...
elementalgrace Posted August 7, 2006 Share Posted August 7, 2006 sans-serif -> resembles Times New Roman (windows) or Times (mac)serif -> resembles Arial (windows) or Helvetica (mac)monospace -> Courier New (windows), Courier (mac)cursive -> Zapf-Chanceryfantasy -> WesternGreat post but I think you've got your serif and sans-serif fonts mixed up! Link to comment Share on other sites More sharing options...
aspnetguy Posted August 7, 2006 Share Posted August 7, 2006 Great post but I think you've got your serif and sans-serif fonts mixed up!They do...Verdana and Arial are sans-serif and Times and Georgia are serif..for example. Link to comment Share on other sites More sharing options...
murfitUK Posted August 7, 2006 Share Posted August 7, 2006 Guilty as charged! I'll put it down to the late hour - way past my usual bedtime!serif = has the twiddly bits around the edges of the character.sans-serif = without the twiddly bits. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now