W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2007

[whatwg] Semantic use of the <font> element

From: Nicholas Shanks <contact@nickshanks.com>
Date: Thu, 12 Apr 2007 22:24:26 +0100
Message-ID: <93E4E2CC-62B4-408E-9D37-35343D5508C3@nickshanks.com>
I have a website which discusses typography, web design, and computer  
fonts. It recently occurred to me that my use of spans with style  
elements was not really the most semantic method of getting across my  
meaning, and I would be better using the font element.

My content goes something like this:

<span style="font-family:Helvetica">This is a sample of Helvetica</ 
span><br>
<span style="font-family:Arial">This is a sample of Arial</span>

Which loses its visual meaning if the CSS is stripped, overridden, or  
not understood, and further more I cannot supply fallback fonts  
(since that would create a misleading visual appearance) and so here  
contradict the CSS guidelines for the font-family property.
Would it not be more correct to use:

<font face="Helvetica">This is a sample of Helvetica</font><br>
<font face="Arial">This is a sample of Arial</font>

In this instance I am saying to the browser that the font is the  
critical part of that run of text, and the fact that <font> doesn't  
support fall-back works in my favour here, as well as the usage being  
fully compatible with graphical UAs.

- Nicholas.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070412/18f552dd/attachment.bin>
Received on Thursday, 12 April 2007 14:24:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:54 UTC