我知道这些实体<和>用于<和>,但是我很好奇这些名称的含义。
是<代表“ Left tag ”之类的东西还是仅仅是代码?
我知道这些实体<和>用于<和>,但是我很好奇这些名称的含义。
是<代表“ Left tag ”之类的东西还是仅仅是代码?
< stands for lesser than (<) symbol and, the > sign stands for greater than (>) symbol.
For more information on HTML Entities, visit this link:
> and <是HTML中>and <字符的字符实体引用。
It is not possible to use the less than (<) or greater than (>) signs in your file, because the browser will mix them with tags.
for these difficulties you can use entity names(>) and entity numbers(<).
它们用于显式定义小于和大于符号。如果要输入<html>而不是HTML中的标记,则可以使用它们。另一种方法是将<code>元素包装在代码周围,以免碰到该元素。
它们也可以用来表示数学运算符。
<!ENTITY lt CDATA "<" -- less-than sign, U+003C ISOnum -->
<!ENTITY gt CDATA ">" -- greater-than sign, U+003E ISOnum -->
<=小于<,>=大于>
< 少于: <
> 比...更棒: >
其他人已经指出了正确的答案,但没有明确解释所有重要原因:
<代表 <标志。请记住:LT == 升 ESS 牛逼汉>代表>Just Just:gt == g reater t han<和>字符?>和<字符是HTML中的“保留”字符。<和>用于表示不同属性的开始和结束:例如,<h1>而不是用于显示大于或小于符号。但是,如果您想实际显示这些符号怎么办?您只需使用<和>,浏览器就会确切地知道如何显示它。< == lesser-than == <
> == greater-than == >
in rails: