忽略 html 中的 <tag>

Ignore <tag> in html

我想将以下文字写入我的 html 网页:ClosedRange<Double>

但是,当我将该文本放在段落标记中时,<p>ClosedRange<Double></p>,网页呈现时该标记显然被忽略了。

关于如何忽略 <Double> 周围的标签有什么建议吗?

解决方案是使用 html 个实体 https://dev.w3.org/html5/html-author/charref

<p>ClosedRange&lt;Double&gt;</p>

呈现为:

ClosedRange<Double>

归功于@niclaslindgren