BestWebTutorials.com
A service of CrystalClearWeb.net
 
Web BestWebTutorials.com

XHTML Tutorial #2 - Text Elements, Page 5

Tags that modify the appearance of text

There are several XHTML tags that are used to modify the appearance of text. Here is a list with brief examples

Tag Example
<b> bold
<big> big
<blockquote>
block quote
<cite> citation
<code> code
<del> deleted
<dfn> definition
<em> emphasized
<i> italic
<ins> inserted
<kbd> keyboard
<pre>
preformatted
 
<q> quotation
<s> striketrough
<samp> sample code
<small> small
<strike> strikethrough
<strong> strong
<sub> subscript
<sup> superscript
<tt> teletype
<u> underlined
<var> variable

If you would like to see larger examples click here.

Tags with similar appearance

It is likely that in your browser several of the tags above render exactly the same as some others. Later on, we will discuss how to modify the appearance of certain tags using Cascading Style Sheets. For example, you could change the appearance of every <var> </var> element by simply adding a couple of lines of CSS, and change the appearance so that it doesn't look just like the <em> </em> elements.

This is one reason why it is important to use the proper tag pair and not use several tags to accomplish the same thing.

Below is a list of tags that are similar in appearance (usually) to each other. The first tag in the list is the tag we recommend that you use.

Tag Example Similar Tags
<big> big  
<blockquote>
block quote
 
<code> code <kbd> <samp> <tt>
<del> deleted <s> <strike>
<dfn> definition (note 1)
<em> emphasized <cite> <i>
<ins> inserted <u>
<pre>
preformatted
 
 
<q> quotation  
<small> small  
<strong> strong <b>
<sub> subscript  
<sup> superscript  
<var> variable (note 2)

1 <dfn> is a special tag used for definitions. It is usually rendered as italic text, but should only be used for definitions.

2 <var> is a special tag used to define a variable name. It is usually rendered as italic text, but should only be used for variable names.

BestWebTutorials.com is a free service of CrystalClearWeb.net. You can help us keep providing free tutorials and information by:

  • Link to us
  • Tell a friend
  • Correct any  you might find
  • Make for improvement
  • Make a donation


web services byCrystalClearWeb.net