Learn

HTML Entities Guide

About this tool

Escape and unescape HTML special characters, choosing between named entities and numeric ones, so text can be embedded safely in a page or a snippet read back to see what it really contains. It escapes what needs escaping rather than every non-ASCII character, which keeps the output readable.

Questions

Which characters actually need escaping?
In HTML text content, & and <. Inside an attribute value, also the quote character you are using to delimit it. Escaping more than that is harmless but makes the source noisy.