indiWiz.com
SiteSearch:
Jump:

Site Map | WizTools.org | jCraze Blog
Web Developer's Den!
Home : WDD : html
This Article...
Print Version
Add Comment
View Comments
html
HTML Primer 1
HTML Primer 2
Hyperlinks
Color Guide 1
Color Guide 2
Fonts in HTML
HTML Lists
Table Tutor 1
Table Tutor 2
HTMLfx
HTML Special Characters
HTML Editors
Animation and HTML
XHTML - The Bare Facts
Sections

Commniquè
Sign Guestbook!
Read Guestbook!
MailMe!

Subhash's Guide to Fonts in HTML

The font face of a text can be changed using the <FONT> tag with the attribute FACE.

Example

<p><font face="arial,helvetica">
This paragraph is displayed either in ARIAL or HELVETICA font.
</font></p>

This would display thus:

This paragraph is displayed either in ARIAL or HELVETICA font.

The important thing to understand about fonts is that it will display properly only if the client has the same font installed. Suppose, in the example, the client has not installed ARIAL, then the paragraph will display in HELVETICA. If he doesn't have even that installed, then GOD knows how the page will display in his page! So it a good practice to include all common font names in the FACE attribute of the FONT tag. There is no limit to how many you can include. The most common fonts is listed below:

  • Time New Roman
  • Verdana
  • Arial
  • Helvetica
  • Sans-serif

If you want your whole document to be displayed uniformly in one font, you can add the following between the <HEAD> section:

<basefont face="FONT-NAME">

"But I Want to Display my Text in Different FONT!"

There is nothing called 'impossible' in this world! So if you are keen on displaying your text in a special font, well do it using a technology called embedded fonts. For more information visit:

"How do I Change FONT-FACE using CSS?"

The example I gave at the beginning could be written with the help of CSS thus:

<p><span style="font-family:arial,helvetica">
This paragraph is displayed in ARIAL or HELVETICA font.
</span></p>

This will display:

This paragraph is displayed in ARIAL or HELVETICA font.

Note: To learn how to change font colors, refer to Color Guide II.


User Comments

Add Comment

[Quick Stats: Number of main threads: 0, Number of sub-threads: 0]

Sign Guestbook | Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.