Re: Marking up keyboard shortcuts

Giganews Newsgroups
Subject: Re: Marking up keyboard shortcuts
Posted by:  Jukka K. Korpela (jkorpe…@cs.tut.fi)
Date: Thu, 2 Sep 2004

Spartanicus <…@privacy.net> wrote:

> Some use the kbd element (Example: <kbd>Ctrl</kbd>+<kbd>G</kbd>) to
> mark up keyboard shortcuts, but the spec defines kbd as: "Indicates
> *text* to be entered by the user." (emphasis mine).

The concept of "text" is somewhat vague, and it might be argued that
Ctrl G (i.e., BELL, or U+0007) is a character of "text" in a broad sense,
and "Ctrl+G" is one way of referring to it, so
<kbd>Ctrl+G</kbd>
would be OK.

But as you surely know, it's not a big issue in practice, since browsers
generally just render <kbd> in teletype font and leave it at that. If
you, as an author, wish to add (additional) style rules to distinguish
user input from other data, then <kbd> is convenient - but you can handle
things without it, too.

--
Yucca,http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:http://www.cs.tut.fi/~jkorpela/www.html

Replies

None

In response to

Marking up keyboard shortcuts posted by Spartanicus on Thu, 02 Sep 2004