HTML元素 - code

定义

表示代码范例。

Specifies a code sample.

注释

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。

此元素是内嵌元素。

此元素需要关闭标签。

The CODE element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

This element is an inline element.

This element requires a closing tag.

示例代码

下面的例子使用了 CODE 元素,将文本以计算机代码的字体(等宽字体)显示,如值和变量名。

This example uses the CODE element to display text in a font used to represent computer code, such as values or variable names.

<CODE>Here is some text in a small, fixed-width font.</CODE>

另见

samp