如何以纯文本格式显示HTML标签 [英] How to display HTML tags as plain text

查看:273
本文介绍了如何以纯文本格式显示HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上有一个允许HTML的输入表单,我正在尝试添加有关使用HTML标记的说明。我想要的文本

 < strong>看起来就像这条线 - 然后知道如何输入<强> 

但到目前为止,我得到的是:

看起来就像这条线 - 然后知道如何输入它



如何显示标签让人们知道键入内容? < code>< code>& & gt;

$ b $ 和> b

I have an input form on my website where HTML is allowed and I'm trying to add instructions about the use of HTML tags. I'd like the text to

<strong>Look just like this line - so then know how to type it</strong>

But so far all I get is:

Look just like this line - so then know how to type it

How can I show the tags so people know what to type?

解决方案

replace < by &lt; and > by &gt;

这篇关于如何以纯文本格式显示HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆