1. Computing

Discuss in my forum

<code></code>

By

CODE Description:

The CODE tag indicates that the enclosed text is computer code or programming code.

The CODE tag is a semantic tag that gives the enclosed text a specific meaning for the computer. These types of tags are used more for style and to markup your text more meaningfully than for layout or design.

CODE Web Browser Support:

HTML Versions

CODE Attributes:

CODE End Tag:

</code> REQUIRED

CODE Contents:

CDATA Usually text. The following tags are valid within the CODE tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, tt, u, var

CODE Valid Context:

The CODE tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

CODE Usage:

standard code example

<p>
  This is a typical HTML header:
  <code>
    &lt;html&gt;
      &lt;head&gt;
        &lt;title&gt;&lt;/title&gt;
      &lt;/head&gt;
  </code>
</p>

CODE Special Notes:

  • Most browsers display the code tag in a monospace font.
  • You should not use this tag to get monospaced text, if you need that, you should use the font-family style property.
  • Don”t confuse the CODE tag with the CODE attribute of the APPLET tag.

More CODE Information:

Related HTML Tags
  1. About.com
  2. Computing
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The CODE Tag - Designates computer code - HTML CODE Tag

©2014 About.com. All rights reserved.