Search code examples
htmlmeta

meta tag with multiple name values


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" />

Solution

  • 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").