The Wayback Machine - https://web.archive.org/web/20090210171838/http://www.webreference.com:80/html/tutorial22/3.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 22 / 3

index12345678

Tutorial 22: The Font of Foulness, Part I: Size Matters

Developer News
Open Source ECM Growing Up
Android's Second Act, G2 Rumors Heat Up
Eclipse Rolls Out PHP Development Tools 2.0

Setting the default font size: The BASEFONT element

Another hack for font sizes is the BASEFONT element. This is an empty element that sets the default font size for any text that is after the BASEFONT element in the document. The following example should illustrate this:

<P>This text is size 3. This text is size 3. 
This text is size 3. <FONT SIZE="+1">This text is size 4.</FONT> 
This text is size 3. This text is size 3. 
This text is size 3. This text is size 3. 
This text is size 3.</P>

<BASEFONT SIZE="4">

<P>This text is size 4. This text is size 4. 
This text is size 4. <FONT SIZE="+1">This text is size 5</FONT>. 
This text is size 4. This text is size 4. 
This text is size 4. This text is size 4. 
This text is size 4.</P>

<BASEFONT SIZE="3">

<P>This text is size 3. This text is size 3. 
This text is size 3. <FONT SIZE="+1">This text is size 4.</FONT> 
This text is size 3. This text is size 3. 
This text is size 3. This text is size 3. 
This text is size 3.</P>

This text is size 3. This text is size 3. This text is size 3. This text is size 4. This text is size 3. This text is size 3. This text is size 3. This text is size 3. This text is size 3.

This text is size 4. This text is size 4. This text is size 4. This text is size 5. This text is size 4. This text is size 4. This text is size 4. This text is size 4. This text is size 4.

This text is size 3. This text is size 3. This text is size 3. This text is size 4. This text is size 3. This text is size 3. This text is size 3. This text is size 3. This text is size 3.

BASEFONT is annoying because it affects elements that are not its children, and generally doesn't fit in well with the rest of HTML. It also means the use of FONT, which is a bad idea in the first place. So, in general, avoid it like the plague.

index12345678

http://www.internet.com/

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Windows Forms: Applications · Building a Client-Side Ajax Cache · Using Dojo for Client-Side Validation
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Booming Even Amidst Down Economy · AMD Phenom II X3 720 BE & X4 810 Review · Intuit 'Stimulus Package' Offers Free Products and Services

Legal Notices.

URL: http://www.webreference.com/html/tutorial22/3.html

Produced by Stephanos Piperoglou
Created: June 14, 2000
Revised: June 15, 2000

Morty Proxy This is a proxified and sanitized view of the page, visit original site.