Convert text into HTML-safe entities so it displays literally in markup instead of being parsed as tags. Essential before pasting user content into HTML.
<, >, &, ", and ' become named entities; every other non-ASCII character becomes a numeric (&#xHH;) entity.
To stop browsers from interpreting your text as HTML/markup and to avoid breaking your page layout.
No. Entity-encoded text renders identically to the original once the browser parses it.