Difference between revisions of "Template:Kbd/doc"

From LFS Manual
Jump to navigationJump to search
(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...")
 
m
Line 1: Line 1:
 +
{{Documentation subpage}}
 +
 
== Purpose ==
 
== Purpose ==
  

Revision as of 09:24, 24 January 2024

Information icon4.png This is a documentation subpage for Template:Kbd.

It may contain usage information, categories and other content that is not part of the original page.

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