What's the difference between meta name and meta property?

HtmlMetadataMeta

Html Problem Overview


Two common meta element attributes are:

<meta name="" content="">

and

<meta property="" content="">

what is the difference between meta name and meta property?

Html Solutions


Solution 1 - Html

The name attribute is the "usual" way for specifying metadata in HTML. It’s defined in the HTML5 spec.

The property attribute comes from RDFa.

RDFa 1.1 extends HTML5 so that it’s valid to use meta and link elements in the body, as long as they contain a property attribute.

You can use both ways, HTML5’s name and RDFa’s property, together on the same meta element.

Note that you might also see meta elements with an itemprop attribute. That would be from Microdata.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionweaveoftherideView Question on Stackoverflow
Solution 1 - HtmlunorView Answer on Stackoverflow