Content-Based Style Tags

Content-based style tags are more concerned with what a particular piece of text means or represents, rather than what it looks like. Content-based style tags are probably going to disappear, over time, in favor of custom XML tags; XML tags are much more flexible and expansible in terms of the content they can potentially mark up. Of the content-based tags, only three are in occasional use today: EM (emphasis), STRONG (strong), and CITE (cite/citation). For a complete list of content-based style tags, see "HTML and XHTML: The Definitive Guide".

Tag: EM
Description: Adds emphasis to a piece of text, usually rendered using italics.

Example:

<p>I <em>really</em> want to do something with my life.</p>

Displayed:

I really want to do something with my life.

Tag: STRONG
Description: Makes text stronger, very emphatic; is usually rendered in bold text.

Example:

<p>I <em>really</em> want to do <strong>something</strong> with my life.</p>

Displayed:

I really want to do something with my life.

Tag: CITE
Description: Marks a citation (indicated in italics), giving credit to a work or author.

The CITE tag is supposed to mark a citation for a book, magazine, or article title, and may include an A (anchor) tag surrounding the CITE, linking to that particular resource (if it is located online).

Example (without anchor):

<p>I love <cite>Pride and Prejudice</cite>, by Jane Austen.</p>

Displayed:

I love Pride and Prejudice, by Jane Austen.

Example (with anchor):

<p>I love <a href="http://www.pemberley.com/janeinfo/pridprej.html"><cite>Pride and Prejudice</cite></a>, by Jane Austen.</p>

Displayed:

I love Pride and Prejudice, by Jane Austen.

Theoretically, instances of a CITE tag within a document could be extracted to create a bibliography of works from your web site, including links; this task could be performed by a web browser automatically, were this feature ever implemented by anybody (which it hasn't been).

Another use of the CITE tag is a modification of its true purpose, marking a creator of a particular web page, and/or the date when that page was last updated. Warning: the CITE tag does NOT put a special line break or carriage return preceding or following itself, so you'll need to watch your formatting carefully.

Example:

<cite>
Creator: Michael Masumoto<br />
Last Updated: October 31, 2000
</cite>

Displayed:

Creator: Michael Masumoto
Last Updated: October 31, 2000

If you want to give an address on a web page in place of or in addition to your citation, use the ADDRESS tag (this is not a content-based style, but I think I should mention it anyway). The ADDRESS tag is discussed in more detail in "HTML and XHTML: The Definitive Guide", pp.114-116. Don't forget to include your mailto link.

Tag: ADDRESS
Description: Marks a mailing address, including email contact, if applicable.

<address>
<a href="mailto:webmaster@blug.com">Webmaster</a><br />
1234 Main St.<br />
Brickbath, MI<br />
</address>

Displayed:

Webmaster
1234 Main St.
Brickbath, MI

Main Menu