Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML <samp> tags


May 05, 2021 HTML Reference Manual


Table of contents


HTML .lt;samp> tags

The label is used to identify the output of a computer program, and the text defined by that label is displayed in a special style, usually using the browser's default monotype font, refer to the following example:

Format the text in the document:

<samp>计算机样本</samp>

Try it out . . .

Browser support

HTML <samp> tags HTML <samp> tags HTML <samp> tags HTML <samp> tags HTML <samp> tags

All major browsers support the hashtag.


Label definition and instructions for use

A tag is a phrase tag that defines the sample text of a computer program.

Tip: We're not against using this label, but if you're using it just to achieve some visual effect, we recommend using CSS, which might lead to richer results.

All phrase tags:

标签 描述
<em> 呈现为被强调的文本。
<strong> 定义重要的文本。
<dfn> 定义一个定义项目。
<code> 定义计算机代码文本。
<samp> 定义样本文本。
<kbd> 定义键盘文本。它表示文本是从键盘上键入的。它经常用在与计算机相关的文档或手册中。
<var> 定义变量。您可以将此标签与 <pre> 及 <code> 标签配合使用。


The difference between HTML 4.01 and HTML5

No.


Global properties

The label supports the global properties of HTML.


The event property

The tag supports the event properties of HTML.


Related articles

HTML tutorial: HTML text formatting