murphaloid — 2012-03-19T19:29:15-04:00 — #1
I'm getting this validation error at w3 validator:
Error Line 7, Column 84: Bad value title for attribute name on element meta: Keyword title is not registered.
…ta name="title" content="Man in Fear - When is an accident not an accident?" />
...I'm using a HTML5 Doctype, and dont really know what Im doing with meta tags yet.
Can anyone explain why it has a problem with "title"
ralphm — 2012-03-19T20:16:19-04:00 — #2
The real title element just looks like this:
<title>Man in Fear - When is an accident not an accident?</title>
That's what serch engines mainly use, I believe.
I don't know what they do with the meta equivalent, but I never see it used, so perhaps it's been dropped from HTML5.
ryanreese — 2012-03-19T21:32:09-04:00 — #3
The title attribute on a meta tag is invalid. It's not part of HTML. If you meant content="blah blah" than you need to change it :).
ralphm — 2012-03-20T00:20:28-04:00 — #4
<meta name="" ...> is used, and isn't technically invalid, as you can theoretically have any kind of meta tag properties (as I understand it).
The META element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.) and assign values to those properties. This specification does not define a normative set of properties.
There doesn't seem to be any obligation for user agents to recognize them, though. The
<title></title> element is the standard way of indicating a page title, so just use that.
murphaloid — 2012-03-20T04:55:17-04:00 — #5
Ah so you mean just drop the meta tag with 'title' in, and just let the <title> tag in the head do the same job?
ralphm — 2012-03-20T05:28:59-04:00 — #6
murphaloid — 2012-03-20T05:50:21-04:00 — #7
Great! Thanks for your help guys
ryanreese — 2012-03-20T09:02:35-04:00 — #8
If having it is causing a validation error, I do believe that makes it invalid .
xhtmlcoder — 2012-03-20T10:17:35-04:00 — #9
We aren't talking about a title attribute here it is a 'name' value by the looks of things: <meta name="[...]" content="Man in Fear - When is an accident not an accident?" />
Though without the full META element code example in post#1; it is hard to tell but I suspect it was supposed to read 'description' or another valid word.
The Validator clearly states the NAME attribute has an INVALID (custom) value nothing more.
Obviously META itself can have a title attribute in FRED5 (because it is stupidly lax) but like I said it was the name attribute value at fault. Obviously a normative language like XHTML 1.x does NOT allow a title attribute (title="...") on META but we are analysing the 'name' not 'title' attribute anyway.
As you can plainly see 'title' isn't a Fred5 'registered keyword' or 'standard meta name' for example: http://dev.w3.org/html5/spec/semantics.html#standard-metadata-names
Though to be honest you'd probably be better using a normative markup language like HTML 4.01 anyway.
ralphm — 2012-03-20T19:41:49-04:00 — #10
The OP asked if using a <title></title> element in the head was the way to go, and I said Yes. What's the problem?
ryanreese — 2012-03-20T22:31:36-04:00 — #11
xhtmlcoder — 2012-03-21T09:21:37-04:00 — #12
Don't worry guys I know, what I am talking about anyway or at least occasionally.