HTML
Labels retain the text format you need, such as not canceling line changes and spaces, and the text shown is equally wide, refer to the following example:Browser support
Most browsers currently support the hashtag.
Label definition and instructions for use
Labels define pre-formatted text.
Text that is surrounded by the label element usually retains spaces and line breaks. The text is rendered as an equal width font.
Note: The element is a block-level element, but can only contain text or in-line elements, and no block-level element (commonly labeled as one that can cause a paragraph to break): for example, the slt;title>
Tips and comments
Tip: A common application of tags is to represent the source code of your computer.
Tip: The label is used in combination with the label for more precise semantics.
The difference between HTML 4.01 and HTML5
In HTML 4.01, the "width" property is obsolete and unavailable. HTML5 does not support the "width" property.
Property
属性 | 值 | 描述 |
---|---|---|
width | number | HTML5 不支持该属性。HTML 4.01 已废弃该属性。 定义每行的最大字符数(通常是 40、80 或 132)。 |
Global properties
The label supports global properties and views the full property sheet HTML global properties.
The event property
The label supports all HTML event properties.