HTML entities 是特殊代码,用于表示那些本来会被解释为 markup 的字符,或者难以输入的字符。它们以 & 开头,以 ; 结尾。
你必须转义的字符
四个字符在 HTML 中具有特殊含义,当你想表示字面意思时必须将其写成 entities:
text
< → < (less-than — otherwise starts a tag)
> → > (greater-than)
& → & (ampersand — otherwise starts an entity)
" → " (inside attribute values)
html
Use the element
Use the div element
