<var>
<var>
Tag
The <var>
tag in HTML is used to indicate a variable in mathematical expressions or programming code. By default, browsers render the text inside this tag in italics.
Syntax
<var>variable-name</var>
<var>
Demo
A simple equation: x = y + 2
<p>
A simple equation: <var>x</var> = <var>y</var> + 2
</p>
Attributes
This element supports only the global attributes.
Conclusion
The <var>
tag in HTML is used to represent variables in mathematical expressions and programming contexts, making equations and code more readable. The text is typically displayed in italics, helping to visually differentiate variables from regular text. This tag enhances the structure and clarity of technical content on web pages.
<u>
The HTML <u> element underlines text, used to highlight or distinguish it. However, CSS is now commonly used for this styling purpose instead.
<wbr>
The HTML <wbr> element indicates a potential line break within text, enabling the browser to break the line at that location if necessary, thereby enhancing text wrapping and readability.