W3C home > Mailing lists > Public > public-html-comments@w3.org > December 2007

Re: Don't deprecate tt

From: Matthew Szudzik <mszudzik@andrew.cmu.edu>
Date: Thu, 20 Dec 2007 15:31:28 +0000
To: public-html-comments@w3.org
Cc: Anne van Kesteren <annevk@opera.com>
Message-ID: <20071220153127.GA22940@l3bw.myhome.westell.com>

> What stops you from styling the <tt> element?

To style the <tt> element with a font that is not monospaced would
violate the semantics of the element.  Indeed, the HTML 4.01
Specification states

 TT: Renders as teletype or monospaced text.

But there is no requirement that <code> be styled in a monospaced font.
In fact, it is common in many textbooks and professional journals that
code be typeset in a proportional font.  For example, see

 http://www.amazon.com/gp/sitbv3/reader?ie=UTF8&p=S00N&asin=0387948600

So, if the content explicitly requires a monospaced font, then <tt> is
more appropriate, because there is no guarantee that <code> will be
monospaced.
Received on Thursday, 20 December 2007 15:33:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:13:58 GMT