I am replacing an image with a <div>
with background-image
for the reason of background-size: cover;
The page is structured the same way as before with a image just that "the image" is a div now.
Does is makes sense to give that itemprop to a <div>
?
In contemporary cognitive linguistics, an image schema is considered an embodied prelinguistic structure of experience that motivates conceptual metaphor mappings. Learned in early infancy they are often described as spatiotemporal relationships that enable actions and describe characteristics of the environment.
The itemprop global attribute is used to add properties to an item. Every HTML element can have an itemprop attribute specified, and an itemprop consists of a name-value pair. Each name-value pair is called a property, and a group of one or more properties forms an item.
Item-type attributes are attributes that are applicable only to items of the same type. For example, collar size and sleeve size are attributes specific to shirts and waist and length attributes are specific to pants.
itemscope is a boolean global attribute that defines the scope of associated metadata. Specifying the itemscope attribute for an element creates a new item, which results in a number of name-value pairs that are associated with the element.
CSS is not recognized by any Microdata parser that I'm aware of. You'll need to add a meta tag to specify the image like this:
<div itemscope itemtype="http://schema.org/Article"> <meta itemprop="image" content="bg.jpg"></meta> <div style="background-image:url('bg.jpg')"></div> </div>
this is a good use for a meta tag within the containing div for your itemscope.
The two attributes you want in that meta tag are itemprop
and content
<meta itemprop="image" content="/some/url/to/an/image.gif" />
You can verify that meta information is, in fact, read just fine by testing it here: http://www.google.com/webmasters/tools/richsnippets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With