name or property attribute for Open Graph (meta) tags

Viewed 168

When I read Facebook's docs regarding Open Graph tags, I can see they recommend using the property attribute when declaring them. However, in looking at MDN's references on the meta tag it seems the property attribute isn't valid.

When I watch Apple's Safari 15 videos, they recommend using the name attribute instead. But then Apple also have docs that conflict that.

Which of the two examples is actually correct:

<!-- Example 1 -->
<meta
  content="My Cool Title"
  name="og:title"
>

<!-- Example 2 -->
<meta
  content="My Cool Title"
  property="og:title"
>

Should I be using name or property with my <meta> tags?

0 Answers
Related