July 5, 201214 yr Hello All, I was wondering if someone could explain to me what the <meta charset="utf-8" /> is and how it works? Thank you as always, Best wishes Graeme
July 6, 201214 yr It's all explained here http://en.wikipedia.org/wiki/Character_encoding Essentially it tells a browser how to apply font characters. The only important thing I've learnt is that when using charset="utf-8" you often need to use the character equivalent from here http://www.tedmontgomery.com/tutorial/HTMLchrc.html like & instead of & or 163; (no space between and 163;) instead of £, not the keyboard symbol otherwise validation raises an error. Other charsets like ISO 8859-1 don't need character codes usually but ISO 8859-1 is out of date for most websites. Edited July 6, 201214 yr by Wickham
July 10, 201214 yr One thing which is probably pointless telling you this, but the XHTML syntax you have there - <meta charset="utf-8" /> isn't needed anymore for HTML5 you can type it like this - <meta charset=utf-8> Handier, easier to remember and cleaner. Same with DOCTYPE! It can be typed as follows. <!DOCTYPE html> thats it.
Create an account or sign in to comment