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> | |
| <dfn> | definition |
| <em> | emphasized |
| <i> | italic |
| <ins> | inserted |
| <kbd> | keyboard |
| <pre> |
preformatted |
| <q> | quotation |
| <s> | |
| <samp> | sample code |
| <small> | small |
| <strike> | |
| <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> | <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
BestWebTutorials.com attempts to post accurate information on this site, but we cannot guarantee that errors do not sometimes occur. The use of code examples from this site in any other site is at the user's own risk. We cannot guarantee that our code might not be in conflict with code written by others, or that our code is fit for other uses.
For further information please review our Terms of Use and Privacy Policy.
Copyright 2005-2008 CrystalClearWeb.net. All rights reserved.

