Bookmark and Share

HTML - Code <code>

The code tag allows you to specify some of your text as computer code. This simply changes the font face, size, and letter spacing to give the text the feel of being computer code.

Advertise on Tizag.com

You may have noticed that nearly all of our examples thus far use the computer code tag when displaying each HTML Code example.

HTML Code:

This text has been formatted to be computer <code>code</code>!

Computer Code:

This text has been formatted to be computer code!

Use this tag to separate any computer code you wish to display on your website. It is not always necessary, but the tag exists if you so desire.

HTML - Code Links

Another use may be to separate links on your page and give them a unique look. This tag provides a very quick way to accomplish this.

HTML Code:

<p>Feel free to search <code>Google</code>
for anything you wish to find on the internet.</p>

Code Links:

Feel free to search Google for anything you wish to find on the internet.
Bookmark and Share


Tips

  • It is not a good idea to use this tag to format large pieces of text. Often times you will lose track of the tags and debugging can be tedious.


Found Something Wrong in this Lesson?

Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!

Advertise Here

More Tutorials!
Microsoft Office Tutorials Artist Tutorials