Replacement for FONT tag

B

Ben Amada

I just discovered that the FONT tag has been deprecated for some time now.
What is the recommended replacement for it?

Thank you,
Ben
 
E

Els

Ben said:
I just discovered that the FONT tag has been deprecated for some time now.
What is the recommended replacement for it?

No replacement, you just set the styles for the font in the
stylesheet:
body{
font-family:Arial, Helvetica, sans-serif;
font-size:100%;
color:rgb(0,0,0);
background-color:rgb(255,255,255);
}
 
B

Ben Amada

Els said:
No replacement, you just set the styles for the font in the
stylesheet:
body{
font-family:Arial, Helvetica, sans-serif;
font-size:100%;
color:rgb(0,0,0);
background-color:rgb(255,255,255);
}

Okay -- I'll start using the styles/CSS from now on.

Thanks for the quick reply!

Ben
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

Ben Amada a écrit :
I just discovered that the FONT tag has been deprecated for some time now.
What is the recommended replacement for it?

Thank you,
Ben

Using Web Standards in Your Web Pages
"The deprecated FONT element is still frequently seen in webpages; (...)
This functionality has been offloaded from HTML to CSS. (...)"
http://www.mozilla.org/docs/web-developer/upgrade_2.html#Deprecated_Font

W3C Quality Assurance tip for webmaster:
Care With Font Size, Recommended Practices: Forget <font>, use CSS
http://www.w3.org/QA/Tips/font-size#goodpractice

Gérard
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

Ben Amada a écrit :
I just discovered that the FONT tag has been deprecated for some time now.
What is the recommended replacement for it?

Thank you,
Ben

The W3C also goes like this:

"
Do not use the FONT element with the FACE attribute. It's considered
harmful from an internationalization standpoint. If you want to learn
how to get rid of your font element and adopt style sheets, we encourage
you to read the tutorial by Todd Fahrner Beyond the FONT tag: Practical
HTML text styling
"
http://www.w3.org/QA/2002/04/Web-Quality#CSSVal

So you may want to have a look at this.

Gérard
 
E

Els

rf said:
Ben said:
Els wrote:

[font *elements*]

Crikey Els...
Okay -- I'll start using the styles/CSS from now on.

A convert without any pain or complaining or swearing. Just a simple - OK.

Done well girl! :)

<g>

Well, I suppose it helped that the OP himself already discovered that
deprecated markup isn't what one should use :)

(if only I'd have the same effect on Luigi :S ;-) )
 
A

Alan J. Flavell

I just discovered that the FONT tag has been deprecated for some
time now. What is the recommended replacement for it?

That very much depends on what you're trying to use it for.

If you're trying to propose cosmetic changes, then it should be
obvious that CSS is the place to do that. Others have already gone
into detail on that; but really, if that's not in one's basic
knowledge nowadays, ask for your money back from whoever introduced
you to the web.

If you were trying font face="symbol" (or webdings, or anything else
that replaces real characters by fake symbols), then "stop doing
that". It doesn't work on specification-conforming browsers anyway:
it gives a visual impression of working on MesSIE, and on some other
browsers in quirky mode, but it's fundamentally unsound. Use the
correct Unicode characters or references (for characters which are
generally supported - MS's WGL4 is a useful guideline) or, at least
for a general audience, find some other way to convey the message.
(Those with specialist requirements might be expected to set up their
browsers and fonts more carefully, to support a wider range of
characters).

Windows users in the USA, in particular (who, it seems from general
reports, get a fairly castrated set of fonts from MS by default)
should be advised to turn on any multinational options that their
respective OS installer might have available for them.

good luck.
 
B

Ben Amada

rf said:
A convert without any pain or complaining or swearing. Just a simple - OK.

LOL. I don't owe anything to the ol' FONT tag! I just want to keep up with
the standards. Plus I'm still young and don't have any problems changing my
ways.
 
B

Ben Amada

Thank you Gérard and Alan for the additional links -- very good information!

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top