Module 2: HTML Syntax and Attributes
Comments and Character References
Add source-code notes and represent reserved characters safely in HTML text.
HTML comments are notes for people reading the source. Browsers do not display them as page content.
<!-- The page header begins here. -->
<header>
<h1>Trail Notes</h1>
</header>
Comments can explain a non-obvious decision, but they should not become a substitute for clear markup. Never put passwords, API keys, private notes, or anything sensitive in comments: anyone who can view the page source can read them.
Some characters have special meaning in HTML syntax. The less-than sign begins a tag, and the ampersand begins a character reference. Use references when you need to display those characters as text.
<p>Use <strong> for strong importance.</p>
<p>Research, design & testing belong together.</p>
<p>Copyright © 2026 ServerSideStory.</p>
Common references include < for <, > for >, & for &, and " for a quotation mark. In most cases, save documents as UTF-8 and type ordinary Unicode characters directly. Character references are useful when a character would otherwise be interpreted as markup or when a named reference makes the source clearer.