ExampleFormat text in a document:
<em>Emphasized text</em>
<strong>Strong text</strong>
<dfn>Definition term</dfn>
<code>Computer code text</code>
<samp>Sample computer code text</samp>
<kbd>Keyboard text</kbd>
<var>Variable</var>
<cite>Citation</cite> |
|
Definition and Usage
The <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, <var>, and <cite> tags are all phrase tags. They are not deprecated, but it is possible to achieve richer effect with CSS.
<em> | Renders as emphasized text |
<strong> | Renders as strong emphasized text |
<dfn> | Defines a definition term |
<code> | Defines computer code text |
<samp> | Defines sample computer code |
<kbd> | Defines keyboard text |
<var> | Defines a variable |
<cite> | Defines a citation |
Browser Support
The <em>, <strong>, <dfn>, <code>, <samp>, <kbd>, <var>, and <cite> tags are supported in all major browsers.
Differences Between HTML and XHTML
NONE
Standard Attributes
id, class, title, style, dir, lang, xml:lang |
For a full description, go to
Standard Attributes.
Event Attributes
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to
Event Attributes.