Why are HTML character entities necessary?

后端 未结 6 1200
挽巷
挽巷 2021-01-04 18:30

Why are HTML character entities necessary? What good are they? I don\'t see the point.

6条回答
  •  滥情空心
    2021-01-04 19:00

    Two main things.

    1. They let you use characters that are not defined in a current charset. E.g., you can legally use ASCII as the charset, and still include arbitrary Unicode characters thorugh entities.
    2. They let you quote characters that HTML gives special meaning to, as Simon noted.

提交回复
热议问题