content logo

Learn HTML:

Html var tag

When writing in HTML, the <var> tag is an inline element used to designate a variable. It is useful when you are writing a page that deals with programming or mathematical expressions. The following sections contain information about this tag, including an example of it in use, as well as related attributes, browser compatibility.

Note: This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.

 

Example code

<p>This is a regular sentence that has <var>variable</var>
   contained within it.</p>

Example result

This is a regular sentence that has variable contained within it.

#HTML Var Example #HTML Var Code #HTML Var Tutorial