Is there a difference between these two?
Indeed - IIUC, only the attribute "name
" is valid HTML, eg: <meta name="..." content="...">
.
See:
Note that the Google documentation Meta tags that Google understands specifies:
<meta name="description" content="A description of the page" />
The use of property
is not straight HTML, but part of the Open Graph spec, an RDFa extension to the HTML spec, which allows Open Graph tags like:
<html prefix="og: https://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock">
</head>
</html>
RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML...
https://en.wikipedia.org/wiki/RDFa
Rich Snippets
Some people say it's because Google has its own preference.
Google will consume a valid meta description, but may display a snippet deemed more useful to an individual user:
A snippet is the description or summary part of search result on Google Search and other properties (for example, Google News). Google uses a number of different sources to automatically determine the appropriate snippet, including descriptive information in the meta description tag for each page. We may also use information found on the page, or create rich results based on markup and content on the page.
https://developers.google.com/search/docs/advanced/appearance/snippet
(emphasis added)
Related Validators
(it seems that the <html prefix=og:...
is no longer required for HTML5 to validate, and indeed, use of <meta property...
doesn't fail validation at all! I'm not sure why...)
<meta property=....
in their example code?