Search⌘ K
AI Features

Using Reserved Characters and Symbols in HTML

Understand how to correctly use reserved characters and special symbols in HTML by utilizing entities. This lesson teaches you the difference between coded and named entities and how to incorporate them into your web pages.

In a few listings, you have already met a strange set of character literals, such as in this snippet:

HTML
<div>
&lt;div&gt; always starts a new block,
<span style="font-weight: bold">
however &lt;span&gt; defines a
logical container for inline text.
</span>
</div>

In those listings I declined to explain what they are, but it is time to get acquainted with them.

There are characters that are reserved in HTML and XHTML. For example, the “<” and “>” signs are reserved, because they are used by the HTML (XHTML) scanner to recognize the beginning and end of tags. However, these ...