The best HTML <pre> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Tips and Notes,Differences in the HTML 4.01 and HTML5,Attributes,Global Properties,Event Properties,
Preformatted text:
Most browsers support <pre> tag.
<Pre> tag define a pre-formatted text.
Is enclosed in <pre> tag text in the element is usually reserved spaces and line breaks. The text will be presented as a monospaced font.
Tip: A common use <pre> tag is used to represent computer source code.
In HTML 4.01, "width" property has been abandoned, unusable. HTML5 does not support the "width" property.
属性 | 值 | 描述 |
---|---|---|
width | number | HTML5 不支持该属性。HTML 4.01 已废弃该属性。 定义每行的最大字符数(通常是 40、80 或 132)。 |
<pre> tag supports the global attributes, view complete the property sheet HTML Global Attributes .
<pre> tag supports all HTML event attributes .