Lesson 10 – HTML5 Special Entities

You often see copyright symbols in the footer. Apparently, there is no way of adding copyright and other symbols in the HTML. Similarly, the browser may also confuse less than (<) and greater than (>) symbols with HTML5 tags. In fact, angle brackets are reserved for tags in HTML5. On the other hand, it will mistake the quotation mark symbol with opening and closing quotations elements’ attributes. What you can do to resolve this problem and make things little easier for browser is to use HTML Characters Entities in HTML5.

The following are the five most important special characters which you should use in HTML5 instead of their respective symbols which are reserved for other purposes.

Symbol Description Entity Name Number Code
Quotation Mark &quot; "
& Ampersand &amp; &
Apostrophe &apos; '
Less-than &lt; <
Greater-than &rt; >

Similarly, the code for some of the most commonly used HTML5 entity characters are as under.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>HTML5 Entities</title>
</head>
<body>
    copyright: &copy; <br>
    currency: &curren; <br>
    registered trademark: &reg; <br>
    angle quotation mark (right): &raquo; <br>
    angle quotation mark (left): &laquo; <br>
   </body>
</html>

This is how they look like in the browser.

You can also visit https://dev.w3.org/html5/html-author/charref for a complete list of HTML5 Entity characters.

What’s Next?

With this, you have completed the Introduction to HTML5 course. In this course, you studied the most basic concepts of HTML5 and how to create your first HTML5 document. However, we have just scratched the surface with this course. From here, you are recommended to study advanced HTML5 concepts and try to develop more complex web pages.