RuskFamily.com ... the Legend Continues Practice Page
| Home | HTML Guide Start | List of HTML Elements | Next Element | Previous Element |

<CODE></CODE>

Display text as computer code


Element is used to show small portions of computer code typically in a mono-spaced font.

        <html>
        <head>
        <title>Some Title</title>
        </head>
        <body>
            .
            .
==>>    <CODE>let a = b + c</CODE>
            .
            .
        </body>
        </html>

Typically you would use this to show an example of code embedded in some other text. To show long bits of code or multiple lines, you would use the PRE element.

HTML 3.0 Draft
Adds language related attributes.
Attributes common to almost all of the tags permitted in the document body include ID, LANG and CLASS. You probably won't be using any of these tags for a while but I've included them so you know they are coming.
ID
A name to be used as a target for links or for naming particular elements in a style sheet. These take the place of the HTML 2.0 <A NAME="somename">Some Name</A> construct that defines internal document links.
LANG
An ISO standard language abbreviation that defines language specific elements to be used.
CLASS
Used to assign a class name to a tag.
An example of these attributes in use is:
<CODE ID="topicone" LANG="en-US" CLASS=section>let a = b + c</CODE>

Netscape

Nothing special.

Microsoft IE

Nothing special.

Internationalization

Nothing special.

| Home | HTML Guide Start | List of HTML Elements | Next Element | Previous Element |

Michael T. Rusk
Comments to author: mike@ruskfamily.com

All contents copyright © 1996-2001 Michael T. Rusk
All rights reserved.

Valid HTML 4.01!   Valid CSS!

Revised: Sunday, December 30, 2007 11:06 -0500
URL: ./htmlgd/tagcode.html