HTML标记以防止HTML标记被执行? [英] HTML tag to prevent HTML tags to be executed?
问题描述
我想到的超级用户问的基本问题,但我认为这是一个编程问题。我刚开始学习HTML,所以请耐心等待。
如何防止程序解释HTML标记/语法? 例如,我想写一个像这样的闪存卡:
<$ c $
$& p>我想要一个适用于任何或大多数语法的解决方案,不仅适用于<
。
如何输入语法(不带任何空格)以确保代码不被解释? 你打算必须手动完成。
此处你有完整的编码表。最常用的代码是:
字符实体编号实体名称描述
&#34;& quot; quot ;引号
'&#39;&''撇号(在IE中不起作用)
&&#38;& amp& amp; amp& amp; amp;
& amp; amp; amp; amp; amp; amp; 60;<小于
&#62;& gt;大于
Basic question which I thought of asking on Superuser, but it is a programming question I think. I just started learning HTML, so please bear with me.
How can I prevent a program from interpreting an HTML tag / syntax? For example, I want to write a flash card like this:
The html code for
<
is<
I would like a solution that would work for any or most syntax, not just for
<
.How can I enter the syntax (without any space) to make sure the code isn't interpreted?
解决方案You are going to have to do it manually.
Here you have the full encoding table. The most commonly used codes are:
Character Entity Number Entity Name Description " " " quotation mark ' ' ' apostrophe (does not work in IE) & & & ampersand < < < less-than > > > greater-than
这篇关于HTML标记以防止HTML标记被执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!