Comments & Entities
Two small tools that solve two unrelated problems: leaving yourself notes the browser won't show, and displaying characters HTML would otherwise try to interpret as markup.
Comments
Anything between <!-- and --> is ignored by the browser. It's useful for explaining a non-obvious choice, or for temporarily switching off a chunk of markup while you're testing something:
</> a comment
<!-- TODO: replace this placeholder image before launch --> <img src="placeholder.jpg" alt="Coming soon">
Comments can also span multiple lines. Try commenting out the second paragraph below and watch it disappear from the result:
Entities
Characters like < and > are part of HTML's own syntax, so you can't just type them into a page and expect them to show up literally — the browser reads them as the start of a tag. An entity is a stand-in code that displays the character instead of acting on it.
<displays<>displays>&displays&"displays" displays a space that won't collapse or line-break like a normal one©displays©
Note: you'll almost never need entities for regular text — only for the handful of characters HTML treats specially (
<, >, &) or ones that are awkward to type directly, like a copyright symbol.