Don't deprecate tt

In the current (12 December 2007) draft of the HTML 5 specification, the
<tt> tag is absent.  I personally use the <tt> tag in my work, and I
would like to persuade individuals to re-introduce <tt> back into the
specification.

In documents that describe computer languages, it is important to
discuss the typographic conventions used to describe those languages.
For example, here is one such discussion of typographic conventions

 http://rand-mh.sourceforge.net/book/overall/thefor.html

which contains the following HTML code snippet

 <dt><tt>Teletype</tt>
 <dd>
 (constant width) is used for sample code fragments and examples.

Note that the content of the document makes explicit reference to a
style of presentation.  It is not possible to separate presentation from
content.  If the <tt> tag were replaced with a <code> tag, and if a
style sheet were to render the content of <code> tags in Helvetica, for
example, then the meaning of this content would be lost.  So, <tt> is
the proper semantic tag in this context, because the author is
discussing teletype text.

The <tt> tag is also of practical use in documents that describe
computer interfaces.  For example, consider the following computer
operating system installation instructions

 http://openbsd.org/faq/faq4.html

which contain the following HTML code snippet

 <li>Erase the character you typed to stop the boot, type<br>
 <tt><b>boot /4.2/i386/bsd.rd</b></tt><br>
 then press <i>Enter</i>.

The important point is that these instructions should simultaneously be
readable from a full-featured, graphic web browser such as Firefox, and
from a legacy, text-only web browser such as Lynx, because an individual
may need to refer to the instructions using a terminal interface, before
the graphic user interface has been fully installed on a machine.

Now, text-only browsers like Lynx ignore style sheets, so the document
must be marked-up with presentational elements such as <b> (which, for
example, renders in blue using Lynx on my machine's terminal interface),
instead of semantic elements like <kbd>, which are ignored.  I note that
presentational elements such as <b> and <i> are included in the HTML 5
specification, and facilitate the use of HTML in this practical
circumstance.

Even though the <tt> tag is ignored by the text-only browser, the same
document must be readable from a graphic web browser.  If <code> were to
be used instead of <tt> in the snippet above, then the HTML becomes a
seemingly inconsistent mix of presentational and semantic markup.  For
the sake of consistency, the <tt> tag is preferred.

Received on Thursday, 20 December 2007 03:41:46 UTC