how to add new font in our html file, client should be see this font style.
| SitePoint Sponsor |
how to add new font in our html file, client should be see this font style.
Simple HTML.
<font face=".....">This is your fancy font</font>this is normal
Justfor a chart of fonts.
HTMLGuy





The web-safe fonts are:
Serifs:
Times New Roman
Georgia
Sans-serifs:
Arial
Verdana
Trebuchet MS
Tahoma
Century Gothic
Lucida Grande
Script
Brush Script MT
Another way to specify fonts in html is by doing it through CSS. Font tags work, but they're a nightmare to maintain. With CSS, you specify the font once for the whole site, thus if your client wants to see a different font used, you only need to change one word.
Here's a quick example:
This goes inbetween the <head> tags
And this goes into a document named styles.cssCode:<link rel="stylesheet" type="text/css" href="styles.css" media="all" />
As you may notice, I've included two fonts followed by commas. This is to provide an alternative font if the user doesn't have the first one installed. You can list as many as you like.Code:body { font: 11px Georgia, Tahoma; }
sorry but my mean we can add more font name in our html page and this html page v can run anywhere in any machine with installed these fonts.
thannks
Hi,Originally Posted by arun9810128800
I think you should be a bit clear in what you are trying to say.
Pubsinbgk


No, well theoretically you can embed fonts via CSS though it's not really advisable.
};-) http://www.xhtmlcoder.com/
Thinking Web: Voices of the Community
> March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?





Hi,Originally Posted by arun9810128800
Yes, you can add more fonts. I thought I explained it clearly above. Put your preferred font followed by alternative ones. Waste of time in my opinion though. If you want to use a fancy font, then use an image or sIFR.


Remember to always put a generic font-family at the end of the list, in case the user doesn't have any of the specified fonts. For example:
Code:font: 100%/1.5 Verdana,Arial,Helvetica,sans-serif;
Birnam wood is come to Dunsinane
But This is not work ?
This is not work ?
Hi,Originally Posted by arun9810128800
I think mstwntd had explained it clearly above. Any ways see if this helps.
This will go in between the HEAD tag.
<link href="/yourstylesfilename.css" rel="stylesheet" type="text/css">
For ex. If your styles file name is styles.css then it should be
<head>
<link href="/styles.css" rel="stylesheet" type="text/css">
</head>
and your styles.css file should have the fonts which you want to use in your html file.
body {
font-size: 100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
h1 {
font-size: 18px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
h2 {
font-size: 14px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
Bookmarks