Working KEY Tag Element Example

Note: Since this file deals with a tag deleted prior to the introduction of HTML 2.0, in order to make it validate I have written it to the standard of HTML described herein. It cannot be validated by any current approved public DTD accepted by the Web Consortium validator, but the validator can now validate to any provided DTD, though it will provide warnings about the Document Type not being in the validator's catalog.

In the DTD prepared by Dan Connolly in January 1993, the <HPn> tags are done away with and finally replaced with what would pretty much become the list of inline data type and formatting tags. Here is the list of new inline formatting elements/tags introduced at that point:

Of all of these there is one element/tag which did not last very long. And that is the <KEY> element. It exists in Dan Connolly's January 1993 DTD, the DTD for the first release of HTML 1, and can be optionally enabled (with ugly SGML commands) for the second release of HTML 1. By HTML 2.0 it was gone, never to be seen again.

Apparently, most browser developers neglected this element, perhaps because of its seeming similarity to <KBD>, which is in fact a very different element. KBD has to do with some string of characters (keystrokes) that the user or operator is to enter, but KEY is about describing a single key on the terminal keyboard. It was intended for those multi-letter keys such as Ctrl or Shift or Alt. Let us see here if your browser knows the KEY element:

<P>Press the <KEY>AltGr</KEY> key to enter letters with
diacritical marks on those keyboards that support them.</P>
Press the AltGr key to enter letters with diacritics on those keyboards that support them.

Recommended Implementation

For compatibility to the early versions of HTML that defined this element, it makes sense to display it in a manner similar to the style sheet example included as part of this demonstration.

Upgrades and Downgrades

Possible downgrades are: Possible upgrades are: This <KEY> demonstration file, "htkey.html," is "HTML 0.h" compliant.

The Style sheet demonstration file "htkey1.html" is HTML 4.01 Transitional compliant.

_________________________________________________________________

Next Level Up