[whatwg] Semantic use of the <font> element

Nicholas Shanks contact at nickshanks.com
Thu Apr 12 14:24:26 PDT 2007


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>


More information about the whatwg mailing list