-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[html] 第87天 举例说明如何原样输出HTML代码,不被浏览器解析? #600
Labels
html
html
Comments
|
方法1: 如果是有空格和回车这样的特殊字符的简单文本, 在文本外加 标签方法2:用<textarea></textarea>标签 方法3:把html的<>转换成特殊字符 (例:< div > 内容 < /div >) 方法4:如果是html内容、javascript、xml或其他特殊内容,使用<xmp></xmp>标签 方法5:如果是在代码中执行时要显示或打印等可以使用 |
|
使用pre标签 |
<xmp></xmp>标签已被废弃,建议不要使用了。 摘自MDN |
|
用<textarea></textarea>标签 使用pre标签 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第87天 举例说明如何原样输出HTML代码,不被浏览器解析?
The text was updated successfully, but these errors were encountered: