Generate HTML Character Codes Fast

characters
One of the headaches in creating valid HTML for your website is the need to convert certain characters over to a special set of codes. We’re talking here about ampersands, dashes, quotes and so on. The codes look something like this: &name;

You’ll need to wrestle with this to ensure that web browsers display these characters properly. It is also a requirement to get these right if you want your web pages to pass validation (and you definitely do).

I was searching around for an easier way to do this and found this nice decoder you can use to do the conversion – just paste your code into the box and it will generate the valid code for you.

For future reference, here’s a complete list of these Character entity references

If you’re writing code snippets for HTML, CSS, etc. and you want these display properly in your browser you’ll need to convert these character codes, otherwise symbols such as < and > will not be shown properly (I had to use the character codes to write those!)

Image by SuperFantastic on Flickr under CreativeCommons attribution license

Share this:
  • Facebook
  • del.icio.us
  • Print
  • Twitter
  • StumbleUpon
  • Technorati
  • Digg
  • Suggest to Techmeme via Twitter
  • Google Bookmarks
  • email

Related posts:

  1. Do You Sell Fast Food?
  2. Why Google Chrome Browser is Important for Your Website
Tags:

You can share a copy of this post on your own website provided you include a link back to the original. Happy reading!

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.