skip to main |
skip to sidebar
Showing posts with label
How to Use Character Entities in CSS and HTML and JavaScript.
Show all posts
Showing posts with label
How to Use Character Entities in CSS and HTML and JavaScript.
Show all posts
Sometimes, when using scripts, we must write special characters like accents by using a special set of codes called character entities, however these don't always look good or we get a question mark or other strange symbols. Usually, this is solved if the character encoding is done right but the logic may not always work.
In Blogger, special characters most of the time appear correctly, but when it is about other services, like external files, things can get complicated.
For example, this usually looks good and when you click script the below code, you should see the letters in the right way:
alert(" á é í ó ú ☺ ✛ ❤ ");