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.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to