Template:Kbd/doc

From LFS Manual
< Template:Kbd
Revision as of 09:26, 3 December 2023 by Flame CZE (talk | contribs) (Created page with "== Purpose == {{See also|Template:Key press}} This template is for explicitly indicating that the content inside it represents input from a keyboard or other source. It use...")
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to navigationJump to search

Purpose

This template is for explicitly indicating that the content inside it represents input from a keyboard or other source. It uses the HTML element <kbd>...</kbd> (keyboard input) which exists for this purpose, and applies some styling to it, namely a faint grey background and slight CSS letter-spacing to suggest individually entered characters. It retains the default monospaced (non-proportional) font style of the <kbd> element. Because it uses <kbd>...</kbd> instead of simply applying visual style effects, it is semantic markup that conveys meaning, and it can be further acted upon by the user agent (e.g. with custom local style sheets). This tag is the exact opposite of {{samp}}, which is for example output.

Usage

Markup Renders as
Enter {{kbd|71077345}} on a calculator

Enter 71077345 on a calculator