• in
InterCourses
CoursesBlogs
0
← Introduction to HTML
○What Is HTML? See Tags in Action○Exercise: Build the Meridian Signal○Complete HTML5 Page Structure: See It in Action○Exercise: Build a Complete HTML5 Page✦Module Quiz
○Heading Hierarchy Demo: H1 and H2○Exercise: Extend the Signal Brief○Paragraphs and Inline Tags Demo○Exercise: Write Meridian's Survey Notes○List Types Demo: Steps, Items, and Terms○Exercise: Build a Crew member Loadout○Challenge: Transmit a Rescue Signal✦Module Quiz
○Hyperlinks○Images○Applying Styles to HTML✦Module Quiz
○Div and Span○HTML Tables○Classes and IDs○Review: Structured Profile✦Module Quiz
○Project 1 - Visiting Card Structure○Project 1 - Visiting Card Actions✦Module Quiz
○The Head Element and Page Title○Meta Tags●HTML Entities✦Module Quiz
○Form Basics Demo: Join the Meridian Relay○Exercise: Build a Night-Shift Check-In○Input Types Demo: Build a Mission Profile○Exercise: Record Beacon Maintenance○Choice Controls Demo: Select Training Modes○Exercise: Plan a Supply Pickup○Response Controls Demo: Send a Mission Reply○Exercise: Build a Rescue Dispatch Report○Challenge: Send an Emergency Beacon✦Module Quiz
○Project 2 - Contact Us Form Structure○Project 2 - Contact Us Form Actions✦Module Quiz
○Embedding Video○Embedding Audio○Iframes✦Module Quiz
○Semantic HTML Tags○Details, Figure, and Figcaption✦Module Quiz
○Project 3 - Resume Semantic Structure○Project 3 - Resume Links and Actions✦Module Quiz

HTML Entities

Mission

The walking-club route notes need to show a trail rule, a copyright line, and “Maps & Snacks” exactly as written. Some of those characters mean something special to HTML, so use entities to make the browser display the intended text. Your preview should show the symbols, not broken markup.

What you'll build

A route notes snippet that displays comparison operators, a copyright symbol, an ampersand, and a non-breaking distance label — all as visible text using HTML entities.

The starter supplies the document and heading; add four short route notes below it.

Escape characters that HTML reads as markup

An entity starts with & and ends with ;. Use it when you need a reserved character to appear as text.

html
<p>5 &lt; 10</p>    <!-- displays: 5 < 10 -->
<p>10 &gt; 5</p>    <!-- displays: 10 > 5 -->
<p>Maps &amp; Snacks</p>

Without &lt; and &gt;, the browser could mistake your comparison for a tag. &amp; displays a literal ampersand.

Keep small units together

&nbsp; is a non-breaking space: it keeps the words on either side on the same line. Use it for a unit such as a distance, not to create page layout spacing.

html
<p>Meet at the 3&nbsp;km marker.</p>

A compact symbol kit

EntityCharacterUseful for
&lt;<Less-than sign
&gt;>Greater-than sign
&amp;&Ampersand
&quot;"Double quote
&apos;'Apostrophe / single quote
&nbsp;(space)Non-breaking space
&copy;©Copyright symbol
&mdash;—Em dash

You can also use numeric forms such as &#60; or &#x3C; for <, but named entities are often easier to read.

Checkpoint

Run the page. You should see the comparison signs, copyright symbol, and ampersand as ordinary text. If a line disappears or becomes a tag, inspect each entity for its opening & and closing ;.

Your Task

  1. Display the text: 5 < 10 and 10 > 5 using entities.
  2. Show a copyright line using &copy;, for example © City Walking Club. All rights reserved.
  3. Use & to display a literal & (e.g., HTML & CSS).
  4. Use &nbsp; to prevent a line break between two words.

Payoff

The route notes can now show their symbols and short phrases exactly as visitors should read them.

Hint 1
1 / 4
HINT 1

Use < for < and > for > when you want to display them as text (not as tags).

HINT 2

& is the entity for the & character itself.

HINT 3

  is a non-breaking space — useful to prevent text from wrapping at a specific point.

HINT 4

Write named entities with the terminating semicolon, such as © or &.

Take the Quiz →
Loading editor…
READY
intercourses
html