abbr.prefix prefix (computer characters); (Latin prefix=before) (Latin prefix) before...;precursor precursor cells; partial reinforcement effect local reinforcement effect

html pre tag syntax

Function:Define preformatted text.

Note:Text enclosed in pre elements usually retains spaces and newlines. The text will also be rendered as a fixed-width font. A common application of the

 tag is to represent computer source code. Tags that can cause paragraph breaks (such as headings, 

and

tags) must not be included in a block defined by
. Although some browsers will interpret the paragraph end tag as a simple line break, this behavior is not the same in all browsers. Allowed text in pre elements can include physical styles and content-based style variations, as well as links, images, and horizontal dividers.

Note:If you want to use the

 tag to define computer source code, such as HTML source code, please use symbol entities to represent special characters, such as "<" represents " <", ">" represents ">", "&" represents "&".

html pre tag example

   
 离离原上草,一岁一枯荣。 野火烧不尽,春风吹又生。 

可以看到上面我们没有做任何的CSS渲染,文字依然按照我们排列好的形式格式化输出


Run instance »

Click the "Run instance" button to view the online instance


##