简体   繁体   中英

HTML tag to preserve angular brackets

<pre> tag helps to preserve spaces and line brakes in HTML. But I've a text with angular brackets like -

<some text here>

and I want that to appear on web page as it. But if I've this text in html, it is not shown on the page.

Is there any HTML tag which is used to enclose the text will help to preserve angular brackets?

use

&gt; to make > 

and

&lt; to make < 

Try this if works:

<xmp>
    <h1>Hello World</h1>
</xmp>

Or you can use &lt; for "<" and, &gt; for ">"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM