Technical Tags

Here we will discuss the following technical tags used in HTML.

  • Preformatted Text <pre>
  • Code <code>
  • Keyboard <kbd>
  • Variables <var>
  • Program Output <samp>

Preformatted Text <pre>

The HTML <pre> tag represents preformatted text. This tag helps in presenting text exactly as written in the HTML file.  This code does not ignore space and linebreak. 

Code <code>

Any programming language code to render on a Web page should be placed inside <code>...</code> tags. This gives freedom to provide custom styling to that particular tag. It is a paired tag.

Keyboard <kbd>

This HTML element is used to visual keyboard key on a webpage.  It is a paired tag.  

Variables <var>

This is a dedicated HTML tag for presenting programming variables on a web page.  It is mainly used with <pre> and <code> tag. 

Program Output <samp>

This tag is used for representing the output from a program or script.