Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 meta Validation

Im trying to make my first HTML5 page but i simply cant get it to validate W3C keeps telling me that i have some errors i my meta tags.

the page in question is http://www.jmphoto.dk/otus/index.html (its an old HTML4 page that i try to use as base/redeo as HTML 5)

I cant find anny solution to get the following metatags to validate or find anny substitutes for them that will validate

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />
<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

I have used most of the weekend trying to find a solution on the net but with no luck so I realy hope somebody smart can help me with this.

like image 640
Jesper Møller Avatar asked Mar 11 '12 13:03

Jesper Møller


People also ask

What is HTML5 markup validator?

At the time of writing this tutorial HTML5 is very much in initial stage and there are only few validators available on the net. The W3C Markup Validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc.

How do I validate a form in HTML?

HTML Form Validation. There are mainly two ways by which HTML form validation can be performed, 1. Using HTML5 built-in functionality. HTML5 provides this feature of form validation without using JavaScript. Form elements will have validation attributes added which will enable the form validation for us automatically.

What is the W3C markup validator?

The W3C Markup Validator checks the markup validity of Web documents in HTML, XHTML, SMIL, MathML, etc. This validator is part of Unicorn, W3C's unified validator service.

How do I use Unicorn's HTML5 validator?

This validator is part of Unicorn, W3C's unified validator service. To use this validator for HTML5, you need to use More Options and select Document Type as HTML5 (experimental) as shown below. Here is the another currently known HTML5 validators: Henri's Validator.nu (X)HTML5 Validator (Highly Experimental) −


1 Answers

OK, let's take the easy one first:

<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT" />

last-modified is not and has never been a valid attribute of the meta element. Not sure what is intended here.

<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="Expires" content="0" />

Putting caching instructions into meta tags is not a good idea, because although browsers may read them, proxies won't. For that reason, they are invalid and you should send caching instructions as real HTTP headers.

<meta name="distribution" content="Global" />
<meta name="copyright" content="(c) 2012 OTUS" />

Neither distribution nor copyright are recognized values for the name attribute of the meta element. Valid names are described at https://w3c.github.io/html/document-metadata.html#standard-metadata-names and http://wiki.whatwg.org/wiki/MetaExtensions.

I recommend dcterms.audience instead of distribution and dcterms.rights dcterms.rightsHolder instead of copyright.

like image 110
Alohci Avatar answered Oct 04 '22 05:10

Alohci