Character-Level Elements
Last update on: 05-08-2008Character-level elements are tags that affect words or characters within other HTML entities and change the appearance of that text so that it's somehow different from the surrounding textmaking it bold or underlined.
Physical Styles
Logical Styles
Each character style tag has both opening and closing sides and affects the text within those two tags. The following are the eight logical style tags:- <em> element
- <strong> element
- <code> element
- <samp> element
- <kbd> element
- <var> element
- <dfn> element
- <cite> element
- <dfn> element
- <abbr> element
- <acronym> element
The <em> Element: This tag indicates that the characters are to be emphasized in some way; that is, they're formatted differently from the rest of the text. In graphical browsers, typically <em> italicizes the text. For example:
<p>The anteater is the <em>strangest</em> looking animal, isn't it?</p>
The <strong> Element: With this tag, the characters are to be more strongly emphasized than with <em> usually in boldface. Consider the following:
<p>Take a <strong>left turn</strong> at <strong>Dee's Hop Stop</strong></p>
The <code> Element: This tag indicates that the text inside is a code sample and displays it in a fixed-width font such as Courier. For example:
<p><code>#include "trans.h"</code></p>
The <samp> Element: This tag indicates sample text and is generally presented in a fixed-width font, like <code>. An example of its usage follows:
<p>The URL for that page is <samp>http://www.yourfirstwebsite.net/ </samp></p>
The <kbd> Element: This tag indicates text that's intended to be typed by a user. It's also presented in a fixed-width font. Consider the following:
<p>Type the following command: <kbd>find . -name "prune" -print</kbd></p>
The <var> Element: This tag indicates the name of a variable, or some entity to be replaced with an actual value. Often it's displayed as italic or underline, and is used as follows:
<p><code>chown</code> <var>your_name for the_file </var></p>
The <dfn> Element: This tag indicates a definition. <dfn> is used to highlight a word (usually in italics) that will be defined or has just been defined, as in the following example:
<p>Styles that are named after how they are
actually used are called <dfn>logical styles</dfn></p>
The <cite> Element: This tag indicates a short quote or citation, as in the following:
<p>Eggplant has been known to cause nausea in some people<cite> (Lemay, 1994)</cite></p>
The <abbr> Element: This tag indicates the abbreviation of a word, as in the following:
<p>Use the standard two-letter state abbreviation (such as <abbr>CA</abbr> for California)</p>
The <acronym> Element: Similar to the <abbr> tag, <acronym> designates a word formed by combining the initial letters of several words, as in the following example:
<p>Jonathan learned his great problem-handling skills from <acronym>STEPS</acronym> (Simply Tackle Each Problem Seriously)</p>
Try all this tags out
Physical Styles
In addition to these style tags, you can use a set of physical style tags to change the actual presentation style of the textbold, italic, or monospace.
<b> Bold
<i> Italic
<tt> Monospaced typewriter font
<u> Underline (deprecated in HTML 4.0)
<s> Strikethrough (deprecated in HTML 4.0)
<big> Bigger print than the surrounding text
<small> Smaller print
<sub> Subscript
<sup> Superscript
Formatting Text's lessons:
Character-Level ElementsFormatting Using CSS
Preformatted Text
Horizontal Rules
Line Break
Addresses
Quotations
Text Alignment
Fonts And Its Attributes
Special Characters

