html – Is it okay to repeat the itemprop attribute?

Question:

I wonder if repeating itemprop that is wrong. Actually, I want to show 3 products and put the respective itemprop for each situation:

<img class="card-img-top" src="imagem_do_produto1.jpg" alt="produto1">
<h5 class="card-title" itemprop='makesOffer'>produto1</h5>

<img class="card-img-top" src="imagem_do_produto2.jpg" alt="produto2">
<h5 class="card-title" itemprop='makesOffer'>produto2</h5>

<img class="card-img-top" src="imagem_do_produto3.jpg" alt="produto3">
<h5 class="card-title" itemprop='makesOffer'>produto3</h5>

Is it correct that way?

Answer:

It is not prohibited, being correct will depend on the purpose you want to reach when using this attribute.

As said :

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 and value pair. Each name and value pair is called a property, and a group of one or more properties forms an item.

It will depend on the itemscope

Scroll to Top