Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 1.4 — Comments, Whitespace and Character Entities
HTML · Example 1 of 3

Entities and what they become

A normal space has code 32; a non-breaking space has code 160.

Comments are notes in your HTML that the page doesn't show; character entities like < and & let you show characters that HTML would otherwise treat as code, which is also the basis of safe escaping.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Write a paragraph that shows exactly this text: Use <h1> once & only once.

02

Write a footer paragraph with a copyright sign, the year, the name Hectal, and a non-breaking space between Page and 1.

03

Add a comment above a heading explaining that it must match the page title.

Explain it without notes

01

Why do you need &lt; and &amp;? What goes wrong without them?

02

Are HTML comments safe for private notes? Why or why not?

03

What is the difference between a named entity and a numeric entity?

04

How does escaping protect a site against cross-site scripting?

Entities and what they become

Preview

Press Run to see the page.

Console

Nothing logged yet.

Expected console output

Use the <p> tag for paragraphs.
Salt & pepper, 5 < 7, "quoted"
© 2026 Hectal — all rights reserved → read more…
© and © are both the copyright sign. 🙂
Code of the space before km: 160