Dublin Core HTML5 W3C Validation - html

I'm trying to use Dublin Core with HTML5, when I try to validate the code with W3C validator I got a error.
This is the code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="schema.dcterms" href="http://purl.org/dc/terms/">
<meta name="dc.language" content="en">
<meta name="dc.title" content="web site title" />
<title>Test</title>
</head>
<body>
</body>
</html>

The meta keyword dc.language is registered: valid.
The link type schema.dcterms is registered, however, not in the "HTML5 link type extensions" section (so it doesn’t confirm to the requirements described in the HTML5 spec): so it’s, strictly speaking, invalid.
The meta keyword dc.title is not registered: invalid.
You might want to use dcterms.title instead. (By the way, the keyword dcterms.language is also registered.)

Related

Meta name 'mode' in HTML

Revisiting the HTML code I've found interesting tag:
<meta name="mode" content="full" />
Does anynody know what the mode full could stand for?
Rescale to full view on portable devices?
name attribute specifies the name of meta content.
content attribute specifies the list of values that are associate with name attribute.
Check this guide of valid name Meta Documentation
So as per my knowledge is name=mode and content=full is not valid name in HTML. May be this is currently Drafted in upcoming HTML version.
There does not appear to be such value possible.
I tried :
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="mode" content="full" />
</head>
<body>
</body>
</html>
into the W3C HTML5 validator and it throws it as an error.
See this for possible values for the <meta> tag.

Difference between <meta name="title"> tag and <title></title> tag

Please clarify what is the difference between <meta name="title"> tag and <title></title> tag.
<title>Page title</title>
<meta name="title" content="Page title">
If both are used, which is most prioritised?
I observed some sites that have both <meta name="title"> and <title></title> tags and both are the same, which is expected, please confirm?
If we didn't use <meta name="title"> tag title, would I have any problem regarding SEO?
<head>
<title>Stackoverflow</title>
<meta name="description" content="free source">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
</head>
<title> is a required element on any HTML page to be valid markup, and will be what is displayed as the page title in your browser's tab/window title. For instance, try inputting the following markup into the W3C Markup Validator (via "Direct Input"):
<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>
This will produce an error that there is no instance of <title> in <head>.
The <meta name="title" content="page-title"> element is just that -- metadata about your page, that any client browser or web crawler can use or not use as it wants. Whether it is used or not will depend on the crawler/client in question, as none of them are required to look for or not look for it.
So in short, you should have a <title> element if you want valid markup. The <meta> tag is going to depend on whether you want to provide for crawlers/clients, and you'd probably have to check documentation for if a particular crawler uses it.
The first is to display page name.
<title> This will be displayed in the title bar of your Browser. </title>
Second is for crawling.
<meta name="title" content="Whatever you type in here will be displayed on search engines.">
The <title> tag will actually display the page name at the top of the page. The <meta> tag, while used for crawling, could be omitted and the page still should crawl over the <title> tag. I think you could just stick with the <title> tag if you wanted.
I have noticed that for some blog sites google will use
<meta name="description"
for a general description of the site.
So, if you have a blog site where the home page also shows the latest blog post you don't want the site description to be the same as the blog post name defined in
So I'd try meta description for an overview and
<title>
for specific content.

Where should I specify my charset if not on a meta element?

I'm getting an HTML validation error for the following line, I'm not sure where I should specify my charset if I don't do it within the meta tag.
Line 5, Column 70: Attribute charset not allowed on element meta at this point.
<meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
This is because you put it in a Content-type meta tag, this is not allowed.
simply make a seperate meta tag, e.g.
<meta charset="utf-8" />
this should validate for you.
Yes. You should use as this is recommended in html5 and it is a new recommendation.
Below is a simple html5 layout:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
Content of the document......
</body>
</html>

What HTML version is this html

What html version is code snippet below?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="some info here ..." />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Lets go line by line
<!DOCTYPE html> - HTML5 Doctype
<html xmlns="http://www.w3.org/1999/xhtml"> - Refer here
<head> - Document head element
<meta name="Generator" content="some info here ..." /> Description of the program you used to create the HTML document
<meta charset="utf-8" /> - Document Character Encoding, Good read
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> Read Here And Here
I would've certainly wrote a big fat description for each but realized that these were already asked in different questions, so thought to link them instead of repeating the same thing here again.
The code snippet is mostly the start of an HTML5 document in XHTML (XML) serialization, sometimes confusingly called XHTML5.
It is not a conforming document, however; the current HTML5 CR does not allow the attribute http-equiv="X-UA-Compatible" (on rather formal grounds, but still).
The doctype belongs to HTML5 Doctype definition.
So the rest of the document should be bases on HTML5

Suggested meta tags for HTML 5 that should be considered a must have

I am looking at migrating over pages written in XHTML 1.0 to HTML 5 and am looking at the minimum requirements when including meta tags in the <head> element. For example, my current page which is XHTML 1.0 compliant has the following meta tags
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="content-language" content="en-us" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="copyright" content="© 2012" />
<meta name="robot" content="noindex, nofollow" />
Are the following sufficient for HTML 5 and can I also include them?
It is also my understanding that the meta element <meta http-equiv="content-language" content="en-us" /> can now be globally be applied to the <html> element.
<html lang="en-us">
<head>
<meta charset="UTF-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="copyright" content="©" />
<meta name="robot" content="noindex, nofollow" />
<title>sample code</title>
</head>
</html>
There is no such thing as minimum meta tags (unless of course I got your question wrong). As far as I am aware no meta tag is required and the ones you add are the ones for your specific needs.
Consider the following document:
<!DOCTYPE HTML>
<html>
<head>
<title>Some Title</title>
</head>
<body>
</body>
</html>
You can validate it and not get any warning whatsoever. The validator just reminds you that the default encoding is missing. This is not even a warning, just an information.
The working draft has this to say about meta tags:
The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.
And it goes on:
4.2.5.1 Standard metadata names
application-name, author, description, generator, keywords
Further it mentions some additional tags concerning a page's status, contextual representation and character encoding.
Although none of these ar explicitly required by the standard, there are in fact best practices, especially concerning search engine optimization (SEO). This has nothing to do with the HTML standard but with web (search) crawlers.
You can get some good advice which meta tags matter (for Google) at the Webmaster Tools meta tag support page
According to http://validator.w3.org/ the following is an absolutely minimal example of a valid HTML5 document, literally everything else is optional.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Valid HTML5 Document!</title>
</head>
</html>
So, you absolutely must have the charset meta tag defined, and everything else is a matter of accomplishing your goals (search engine related stuff, cache control, etc).
No meta tag is required by any HTML5 draft. (HTML5 is work in progress and may change at any moment without prior notice.)
Many of the tags you list, including the one with content-language, aren’t even allowed (conforming) according to HTML5 drafts. In practice, most of them are useless, but some of them are actively harmful (such as the one that excludes robots, and in most cases those that try to prevent all caching).
Your latter fragment of code is invalid: the html element must contain all other elements, and the head element must contain a title element (in all HTML versions).
Consult the newest W3C HTML5 draft and use the experimental checker http://validator.nu.