How to Add Copyright Symbol in HTML: Simple Syntax & Examples
To add a copyright symbol in HTML, use the character entity
© or the numeric code ©. These codes display the © symbol in the browser without needing special fonts.Syntax
In HTML, you can add the copyright symbol using special codes called character entities. The two common ways are:
©— named entity for ©©— numeric entity for ©
Both codes tell the browser to show the copyright symbol.
html
© or ©Output
© or ©
Example
This example shows how to add the copyright symbol in a simple HTML page using both methods.
html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Copyright Symbol Example</title> </head> <body> <p>Using named entity: &copy; 2024 My Website</p> <p>Using numeric entity: © 2024 My Website</p> </body> </html>
Output
Using named entity: © 2024 My Website
Using numeric entity: © 2024 My Website
Common Pitfalls
Some common mistakes when adding the copyright symbol in HTML are:
- Typing
©without the semicolon;at the end. The browser won't recognize it correctly. - Using plain text © without encoding, which may cause issues in some editors or encodings.
- Copy-pasting the symbol directly without ensuring the file encoding supports it, which can cause display errors.
Always use © or © with the semicolon for best results.
html
<!-- Wrong --> <p>© 2024 My Website</p> <!-- Correct --> <p>© 2024 My Website</p>
Output
Wrong: © 2024 My Website (shows as text)
Correct: © 2024 My Website
Quick Reference
| Code | Description | Output |
|---|---|---|
| © | Named character entity for copyright symbol | © |
| © | Numeric character entity for copyright symbol | © |
| © | Direct symbol (ensure UTF-8 encoding) | © |
Key Takeaways
Use © or © with a semicolon to add the copyright symbol in HTML.
Always include the semicolon at the end of the entity code for correct display.
Avoid typing the symbol directly unless your file encoding is UTF-8.
Using character entities ensures consistent display across browsers and editors.