Breaking News
Home / Design / HTML / The HTML – charset Attribute

The HTML – charset Attribute

I have seen this line of code for years and never knew what it was. I decided to do some research on it.

The HTML attribute “charset” specifies the method to be used to convert bytes into characters. This will ensure an HTML document is displayed properly in the browser.

HTML 2 to 4.01 the default standard was ASCHII encoding for the Latin alphabet

HTML 5 the default standard is Unicode

Current browsers supporting the Charset Attribute:

  • Chrome
  • IE
  • Firefox
  • Opera
  • Safari

The funny thing about the Charset attribute is it really isn’t mandatory. The browsers will default to the proper encoding anyway.

<meta charset=”ISO-8859-1″ />

Is a single byte encoding scheme, meaning it can’t utilize languages with more than 128 symbols.

This means it would have problems with non-Euro characters

<meta charset=”utf-8″ />

UTF-8 is the most common charset today and the most versatile as it is backward compatible with ISO-8859-1. It can utilize any Unicode character.

UTF-8 is a multibyte encoding scheme, which handle more than the ISO 128 symbols.

Final Thought

I was always curious to read up this charset meaning. I learned something but nothing too special as it seams to be handled for you by the browsers anyway.

There is no reason to remove it from your code, so I am going to leave it where it lives and continue ignoring as I have done for the last 20 years.

 

User Rating: Be the first one !

About admin

Leave a Reply

Your email address will not be published. Required fields are marked *