Friday, September 10, 2010

< meta > , specialtecken

Trött på att skriva auml, ouml, aring etc?
I know I am!

Här finns tre 0lika meta-taggar att använda sig av:

  • For HTML (but not in XHTML) it is possible to include this information inside the head element near the top of the document:
< meta http-equiv="Content-Type" content="text/html; charset=utf-8" >

  • HTML5 also allows the following syntax to mean exactly the same:
 < meta charset="utf-8" > 
  • XHTML documents have a third option: to express the character encoding via XML declaration, as follows:
    < ?xml version="1.0" encoding="ISO-8859-1"? > 

Glöm inte ta bort mellanrummen efter <>

No comments:

Post a Comment