HTML5: What is the “correct” behavior for checking unregistered <meta> tags?

Assume that the "HTML 4.01 Transitional" corresponds to the W3 validator :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="revisit-after" content="30 days"> <meta name="DC.Title" content="Website title"> <title>Website title</title> </head><body></body></html> 

When converting this code to HTML5 meta -tag underwent some changes as described here . So the following should be valid HTML5:

 <!DOCTYPE html> <html><head> <meta charset="UTF-8"> <meta name="revisit-after" content="30 days"> <meta name="DC.Title" content="Website title"> <title>Website title</title> </head><body></body></html> 

Except that it does not confirm, because, apparently, meta tags should be registered .

Problem: The W3 documentation does not list meta -tags restrictions as a new HTML5 "function", but they are not checked, as it was before in HTML 4.01 Transitional.

Update: While the official HTML4 documentation does not really limit the value of the fields of the name attribute, the HTML5 project mentions a new restriction (as opposed to the Differences guide). Some posters suggest not using meta tags at all based on SEO arguments, but there were many public and internal uses of meta tags for cache management, documentation, and storage. Should there be a way to turn valid HTML4 code into valid HTML5 code without relying on millions of metaparators to automatically rewrite them?

Question: What should we do in practice?

+4
source share
1 answer

In practice, just leave the meta tags as they are. Even if the validator complains, it does not make a single difference to anyone who uses your site.

+1
source

All Articles