Mobile app version of vmapp.org
Login or Join
Smith883

: Should have an alt tag? I want to follow good SEO practices by adding alt tags to all my images. For Facebook sharing, I have this code: <meta property="og:image" content="..."> Can

@Smith883

Posted in: #AltAttribute #Html #Images #MetaTags #OpenGraphProtocol

I want to follow good SEO practices by adding alt tags to all my images.

For Facebook sharing, I have this code:

<meta property="og:image" content="...">


Can I add an alt="Facebook image" to that?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

2 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

No, you do not need an alt attribute on that meta tag. In fact, it is not even allowed as others have already said.

However, (today) Open Graph specifies and even suggests to provide the image alt text via an og:image:alt property. See ogp.me/#structured.
Note that the og:image meta tag is not an image tag, but rather a hint on which image should be used when displaying that page somewhere else. Thus, the specified alt text will probably improve the image usage for that other site that embeds your page, e.g. Facebook.

10% popularity Vote Up Vote Down


 

@Welton855

No, a meta element cannot have an alt attribute in any HTML specification. Technically, you could have the attribute title="Facebook image", since the title attribute is allowed for all elements according to HTML5 LC (though not HTML 4.01), but it is very unlikely that any browser or search engine cares about it for meta; so it would matter as comment-like documentation only.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme