"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"
<pre> Label
Definitions and usage
Pre elements can define preformatted text. Text that is surrounded in the pre element usually retains spaces and line breaks. The text is also rendered as a equal-width font.
A common application of <pre> tags is to represent the source code of a computer.
Differences between HTML 4.01 and HTML 5
In HTML 4.01, the Width property is not favoured and is no longer supported in HTML 5.
Tips and comments
Wind Network (www.ithov.com) Tip: Use <pre> tags to display unconventional formatted content, or some kind of computer code.
Property
Standard properties
Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.
Event Properties
Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, Ondraghttp://www.aliyun.com/zixun/aggregation/29841.html ">leave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup , OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, onunload for a complete description, please visit the event properties in HTML 5.
Tiy instance
preformatted text
<html> <body> <pre> This is preformatted text. It retains space and linefeed. </pre> <p>pre tags are good for displaying computer code:</p> <pre> For i = 1 to 10 Print I Next I </pre> </body> </html>
This example shows how to control using the pre label in folded lines and spaces.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.