3

I have the following two meta tags on my website

<meta name="author" content="@vanntile" />
<meta name="twitter:creator" content="@vanntile" />

I know that I cannot use two name atributes in the same meta tag, like this:

<meta name="author" name="twitter:creator" content="@vanntile" />

My question is, is the following meta valid?

<meta name="author,twitter:creator" content="@vanntile" />
5
  • What's wrong with the two-tag setup? Commented Aug 4, 2015 at 13:04
  • Nothing wrong, maybe a bit long (but that does not matter). It is just a programming question... Commented Aug 4, 2015 at 13:05
  • 1
    It's your only option here. The method you posited is invalid. Commented Aug 4, 2015 at 15:24
  • Ok. Thanks. Would you post an answer with the official documentation for meta tags? Commented Aug 4, 2015 at 15:35
  • I'm afraid I don't have that to hand, but I know the syntax isn't valid. Commented Aug 4, 2015 at 15:41

1 Answer 1

5

According to the HTML5 Standard, the a meta element with a name attribute expresses a single metadata name-value pair, and the name attribute contains the name part of the pair.

While the code you suggested is not invalid, it will mean the metadata pair ("author,twitter:creator" : "@vanntile"), not both ("author" : "@vanntile") and ("twitter:creator" : "@vanntile").

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.