Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Marking up keyboard shortcuts
September 2, 2004, 4:59 pm
rate this thread
- Jukka K. Korpela
September 3, 2004, 12:06 am
Re: Marking up keyboard shortcuts
> 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
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
- » Anchor Tag with #Name Moves Entire Window Up to X Coordinate
- — Previous thread in » HTML Authoring Forum