HTML – TT (Teletype) and KBD (Keyboard) Tag

0
9
digitalample eye

HTML <TT> (Teletype) Element 

The content of a <tt> element is written in monospaced font (like that of a teletype machine).

<tt> provides no semantic information about the text it encloses. It is purely used for text formatting purposes.

<tt> is short for teletype, and instructs the browser to render the text similar to that produced by old-style teletype machines, which is understood to be a fixed-width (monospace) font.

HTML Code:

the following word will appear in <tt> monospaced</tt> font.

Output:

the following word will appear in a monospaced font.

HTML <kbd> Element. 

The <kbd> element is used for text typed on a keyboard. If when talking about a computer, you want to tell a reader to enter some text, you can use the <kbd> element to indicate what should be typed.

HTML Code

<p> The shortcut key for bold the text <kbd>ctrl</kbd>and<kbd>b</kbd> </p>

HTML Output

The shortcut key for bold the text ctrl and b

You can see above the word ctrl and b are displayed in monospaced font after using <kbd> element. The content of the <kbd> element is usually represented in a monospaced font, rather like a <code> element. 

LEAVE A REPLY

Please enter your comment!
Please enter your name here