Welcome Login

em, strong, dfn, code, samp, kbd, and var tags


<em>       : denders as emphasized text
<strong>   : defines important text
<dfn>      : defines a definition term
<code>     : defines a piece of computer code
<samp>     : defines sample output from a computer program
<kbd>      : defines keyboard input
<var>      : defines a variable

 

These tags are all phrase tags.

Note: em, strong, dfn, code, samp, kbd, and var tags are supported in all major browsers.

Note2: It is possible to achieve richer effect with CSS.

 

Eg:

<!DOCTYPE html>
<html>
<body>

em tag: <em>Emphasized text</em><br /><br />
strong tag: <strong>Strong text</strong><br /><br />
definition tag: <dfn>Definition term</dfn><br /><br />
code tag: <code>A piece of computer code</code><br /><br />
sample tag: <samp>Sample output from a computer program</samp><br /><br />
keyboard input tag: <kbd>Keyboard input</kbd><br /><br />
variable tag: <var>Variable</var>

</body>
</html>

 

Outputs:

html-textformat1


Created on: Monday, November 12, 2012 by Andrew Sin