tags:

views:

68

answers:

6
<font font-family="ravie" >Articles</font></h2>

but this is not working?

+8  A: 

To use the deprecated FONT tag:

<h2><font face="ravie">Articles</font></h2>

Better yet is to use inline styles:

<h2 style="font-family:ravie" >Articles</h2>

And even better is to use header style information:

<head>
    <style>
    h2 {font-family: ravie;}
    </style>
</head>
<body>
    <h2>Articles</h2>
</body>

Best of all is to move the style declaration to an external style sheet, and this is standard practice unless you have a strong reason for not doing so.

RedFilter
I did not downvote, and I see you indicated its deprecated status, but **why even suggest it?!?!?!?!** :P
BoltClock
Because the question specifically asked how to do this using the font tag. There are legitimate reasons for using the `FONT` tag, e.g., cross-platform email HTML support.
RedFilter
@RedFilter: fair enough, I was just playing :)
BoltClock
A: 
<h2 style="font-family:tahoma">Articles</h2>

The tag is deprecated in the latest versions of HTML (HTML 4 and XHTML).

onder
You can just indent your code with four spaces instead of encoding it with entities (I'd done that for you earlier)...
BoltClock
thanks a lot, I didn't know that.
onder
+3  A: 

you do it like this:

<h2 style="font-family:arial">...</h2>

or you do it in your stylesheet. like this:

<h2 class="somthing">...</h2>
.something { font-family:arial }

don't use <font> tags as they have been deprecated.

read: http://en.wikipedia.org/wiki/Font_family_%28HTML%29

Moin Zaman
A: 

The <font> tag is deprecated and no longer used. The better practice now is to use CSS combined with selectors, divs, and spans to style fonts.

Moses
A: 
#obj{
font-family:verdana;
}
steven spielberg
A: 
<h2><td align="center" class="addfont">Articles</h2>

.addfont
{
    font-family: 'ravie';
}

can you try like this? It's very simple . Another advantage is the script can be used inside the page or outside the page,but if you use the outside of page. You must use below the line

<link href="/styles/Filename.css" rel="stylesheet" type="text/css">
AdalArasan