Why are HTML character entities necessary? What good are they? I don't see the point.
HTML provides special characters, called Entities, which are very useful to display special symbols or to develop web pages in a language other than English. These entities allow browsers to display symbols and not misinterpret them as Markup tags.
You don't generally need to use HTML character entities if your editor supports Unicode. Entities can be useful when: Your keyboard does not support the character you need to type. For example, many keyboards do not have em-dash or the copyright symbol.
HTML character entities are basically a set of characters (entity) used to represent few characters reserved by the HTML, especially invisible characters or characters difficult to type out using a regular keyboard. HTML provides some entity names and entity numbers to use these symbols.
An entity tag (ETag) is an HTTP header used for Web cache validation and conditional requests from browsers for resources. Etags use persistent identification elements (PIE) that have been tagged to the user's browser.
Two main things.
"1 < 2
" lets you put "1 < 2
" in your page.
Long answer:
Since HTML uses '<
' to open tags, you can't just type '<
' if you want that as text. Therefore, you have to have a way to say "I want the text <
in my page". Whoever designed HTML (or, actually SGML, HTML's predecessor) decided to use '&
something;
', so you can also put things like non-breaking space: '
' (spaces that are not collapsed or allow a line break). Of course, now you need to have a way to say '&
', so you get '&
'...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With