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

How do we create preformatted text in HTML?

WBOY
Release: 2023-08-25 16:45:02
forward
974 people have browsed it

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><div class="code" style="position:relative; padding:0px; margin:0px;"><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><div class="contentsignin">Copy after login</div></div>

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template