HTML: Learn to Code Character Entities

HTML: Learn to Code Character Entities

  • HTML
  • 2 mins read

In HTML, many of the web pages you create will require special characters such as a copyright symbol, trademark symbol, and registered symbol, etc. To display these special characters; you use character entities. In this HTML tutorial, you'll learn how to code character entities.

Common HTML Character Entities

&lsquo;' (opening single quote)
&rsquo;' (closing single quote)
&ldquo;“ (opening double quote)
&rdquo;” (closing double quote)
&nbsp;A non-breaking space.

Notes on HTML Character Entities

  • All character entities start with an ampersand (&) and end with a semicolon (;). Then the rest of the entity identifies the character it represents.
  • Character entities can be used to display special characters in an HTML document.
  • HTML provides a variety of character entities in addition to the ones above.


<html lang="en">

        body {
            background-color: #ffaec8;

    <h1>HTML Character Entities</h1>
    <h3>Closing Single Quote</h3>
    <p>It&rsquo;s time to start your Christmas shopping.</p>
    <h3>Opening and Closing Double Quotes</h3>
    <p>President John F. Kennedy said, &ldquo; And so, my fellow Americans,
        <br> ask not what your country can do for you; ask what you can do for your
        <br> country.&rdquo;
    <h3>Non-Breaking Space</h3>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;Turning fear into hope, medical futurist Dr. Alan J. Russell will
        <br> discuss the science of regenerating damaged or diseased human body parts, while offering real
        <br> hope for the future
        <br> of human health.</p>
    <h3>Copyright and Ampersand</h3>
    <p>&copy; 2019 John Loney &amp; Associates, Inc.</p>



The output would be as shown in the featured image of this article.

See also: