Skip to main content

HTML Entitystring to display reserved invisible chars in HTML

Sources: Entity - MDN Web Docs Glossary: Definitions of Web-related terms | MDN HTML Standard

aka HTML-Entities

HTML entities JS Syntax begin with & and end with a ;

HTML Entities will be parsed as code

reserved chars include & < > "

wtwg entity list includes !deprecated names with varying capitalizations and excluding trailing semicolons

&nbsp;

HTML Entity to escape non-breaking whitespace in HTML - to preserve whitespace as content, prevent collapse

References

  1. _.unescape(string) ↔ return string with HTML Entity convert back to normal chars - !inverse _.escape(string)

  2. &nbsp;HTML Entity to escape non-breaking whitespace in HTML - to preserve whitespace as content, prevent collapse

  3. _.escape(string) ↔ return string convert into HTML Entity (& < \> " ')