<code>

  • Revision slug: HTML/Element/code
  • Revision title: code
  • Revision id: 17445
  • Created:
  • Creator: Jscher2000
  • Is current revision? No
  • Comment /* HTML ''Code'' Element */

Revision Content

HTML Code Element

<code>...</code> - The HTML Code Element produces an inline element displayed in the browser's default monotype font (Lucida Console). This element was intended to identify a fragment of computer code, but commonly is used to style any text in a fixed width font.

Example

   Regular text.  <code>This is code.</code>  Regular text.

Result

Regular text. This is code. Regular text.

Note

A CSS rule can be defined for the code selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.


See also: HTML Block Quotation Element

{{wiki.template('HTML:Element_Navigation')}}

{{ wiki.languages( { "pl": "pl/HTML/Element/code" } ) }}

Revision Source

<h2 name="HTML_Code_Element"> HTML <i>Code</i> Element </h2>
<p><b>&lt;code&gt;...&lt;/code&gt;</b> - The HTML Code Element produces an inline element displayed in the browser's default monotype font (Lucida Console). This element was intended to identify a fragment of computer code, but commonly is used to style any text in a fixed width font.
</p>
<h3 name="Example"> Example </h3>
<pre class="eval">   Regular text.  &lt;code&gt;This is code.&lt;/code&gt;  Regular text.
</pre>
<h4 name="Result"> Result </h4>
    <p>Regular text. <code>This is code.</code>  Regular text.</p>
<h3 name="Note"> Note </h3>
<p>A CSS rule can be defined for the <code>code</code> selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.
</p><p><br>
See also: <a href="en/HTML/Element/blockquote">HTML Block Quotation Element</a>
</p><p>{{wiki.template('HTML:Element_Navigation')}}
</p>{{ wiki.languages( { "pl": "pl/HTML/Element/code" } ) }}
Revert to this revision