Numerous UTF-8 characters aren’t readily typed via keyboards, yet they can consistently be displayed using numerical representations known as entity numbers:
Example
<!DOCTYPE html> <html> <meta charset=”UTF-8″> <body> <p>I will display A B C</p> <p>I will display A B C</p> </body> </html> |
The <meta charset="UTF-8">
tag sets the character encoding. Characters like A, B, and C map to numbers 65, 66, and 67. Use &#
and ;
to represent characters by their entity numbers.