Home >Web Front-end >HTML Tutorial >How do we create preformatted text in HTML?

How do we create preformatted text in HTML?

WBOY
WBOYforward
2023-08-25 16:45:02969browse

How do we create preformatted text in HTML?

Use the

tag to create preformatted text. <p ><strong>Note: </strong></p> <xmp> tag has been deprecated. <h2 >Example</h2> <p >You can try running the following code to learn how to create preformatted text in HTML −</p><pre class='brush:php;toolbar:false;'>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;HTML xmp Tag&lt;/title&gt; &lt;/head&gt; &lt;body&gt; HTML tags include &lt;xmp&gt;&lt;b&gt; for bold text&lt;/b&gt;, &lt;i&gt; for italic text.&lt;/i&gt;&lt;/xmp&gt; &lt;/body&gt; &lt;/html&gt;</pre>

The above is the detailed content of How do we create preformatted text in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete