HTML Entities and Symbols
What Is It?
A character reference lets you write a symbol that might otherwise be read as HTML code.
What the Tags Mean
<: shows <.>: shows >.&: shows &.©: shows the copyright symbol.
Example 1
Save each example as index.html and open it in your browser. Each code block is a complete page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Entities and Symbols</title>
</head>
<body>
<p>Use <p> to write a paragraph.</p>
</body>
</html>Browser preview
What you see: The page shows: Use <p> to write a paragraph.
Example 2: Another Use
Use character references in ordinary text too.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Entities and Symbols</title>
</head>
<body>
<p>Tea & snacks</p>
<p>© My Learning Club</p>
</body>
</html>Browser preview
Simple Tip
You can type ordinary Unicode symbols such as ₹ directly in a UTF-8 file.
Try It Yourself
Write a sentence that displays the text <h1>.