Difference between revisions of "Template:Kbd"

From LFS Manual
Jump to navigationJump to search
(Created page with "<kbd {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="background:#EEEEEE; {{#if:{{{spacing|}}}| padding-left:{{{padding|0.2em}}}; padding-right:...")
 
m
 
Line 1: Line 1:
<kbd {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="background:#EEEEEE; {{#if:{{{spacing|}}}| padding-left:{{{padding|0.2em}}}; padding-right:{{{padding|0.2em}}};| letter-spacing:0.05em; padding-left:0.25em; padding-right:0.2em;}}{{#if:{{{style|}}}|{{{style}}}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|user input}}}</kbd><noinclude>
+
<kbd {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} style="background:#EEEEEE; {{#if:{{{spacing|}}}| padding-left:{{{padding|0.2em}}}; padding-right:{{{padding|0.2em}}};| letter-spacing:0.05em; padding-left:0.25em; padding-right:0.2em;}}{{#if:{{{style|}}}|{{{style}}}}}" {{#if:{{{lang|}}}|lang="{{{lang}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1|{{{input|}}}}}}</kbd><noinclude>
 
<!--Categories go near the bottom of the /doc page.-->
 
<!--Categories go near the bottom of the /doc page.-->
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 13:25, 4 February 2024

Template Info-Icon.png

Template documentation

View - Edit

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