Skip to content Skip to sidebar Skip to footer

Meta Tag Migration From Html 4.01 To Html5

We are looking at migrating over pages written in HTML 4.01 to HTML5 and am looking at the minimum requirements when including meta tags in the element. For example, m

Solution 1:

There are no required meta elements (with one exception, see below).

You can’t use just any metadata name (name) or pragma directive (http-equiv) like it was case in HTML 4.01. In HTML5, all values must be defined/registered in a certain manner.

So you’d have to check the spec and the wiki for possible values. If a value is not listed, don’t use it (or, if you are sure about it, register it).

Exception: there is a meta element that is sometimes required

Only if you don’t specify the character encoding in a different manner (e.g. in the Content-Type HTTP header), you must use a meta element for specifying it. See Specifying the document's character encoding.

If you use UTF-8, just add the following meta element (ideally as the first child element of head):

<metacharset="utf-8">

Post a Comment for "Meta Tag Migration From Html 4.01 To Html5"