HTML
标签
Example
Preformatted text:
此例演示如何使用 pre 标签 对空行和 空格 进行控制
Try it »
Browser support

Currently most browsers support
标签。
标签定义及使用说明
标签可定义预格式化的文本。 被包围在标签 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。 --- ## 提示和注释 **提示:**标签的一个常见应用就是用来表示计算机的源代码。 --- ## Differences between HTML 4.01 and HTML5 在 HTML 4.01 中,"width" 属性已废弃,不可使用。 HTML5 does not support"width"属性。 --- ## 属性 | 属性 | 值 | Description | | --- | --- | --- | | [width](att-pre-width.html) | *number* | HTML5 does not support该属性。HTML 4.01 已废弃该属性。 定义每行的最大字符数(通常是 40、80 或 132)。 | --- ## Global Attributes标签支持Global Attributes,查看完整属性表 [HTMLGlobal Attributes](/tags/ref-standardattributes.html)。 --- ## Event Properties标签支持所有 [HTML事件属性](/tags/ref-eventattributes.html)。