Continually Improving.... let us know how support@devdiamond.net Sign in | Sign up
home articles news blog forum  

 
 


 
Skip Navigation LinksHome > Article > Text Formatting :: CODE Tag
Text Formatting :: CODE Tag
Abstract :
Learn about the CODE Tag, and what is it used for.

Views : 3300
Published : Saturday, March 16, 2002
By
HyperLink

Avarage Rating :
Page Page 1 of 1

Like the PRE tag, the CODE tag shows text in a monospace font. However, it doesn't add line break before and after the text. The example below shows a comparison between the two methods, and the code of this example

The <code>CODE</code> tag shown here is in monospace font.
If the <code>PRE</code> tag was used instaed, the text would look like this
The <pre>CODE</pre> tag shown here is in monospace font.

Example

The CODE tag shown here is in monospace font.
If the PRE tag was used instaed, the text would look like this
The

CODE
tag shown here is in monospace font.

In short, if you want to show a block of text, use the PRE tag, if you need to emphasize a term in the same sentence, use the CODE tag

<-- Back to PRE Tag -- Next to FONT Tag -->



About Author

        Yasir Send Feedback
        Yasir is a .NET expert, with over 5 years experience in Microsoft Technologies, 8 years overall programming experience, he is the owner, founder & primary contributor of Minwar.com, and he also works as IT Director in the hospitality industry.