S
S
smoky-jo2019-10-02 08:35:40
HTML
smoky-jo, 2019-10-02 08:35:40

Why is content not valid in a div?

Hello, please tell me why the validator shows errors in this markup?

Error: Attribute content not allowed on element div at this point.
From line 981, column 142; to line 981, column 177

<div class="lprice1" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<span itemprop="priceCurrency" content="RUB"></span>
<div itemprop="price" content="0"></div>Цена не указана</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Chefranov, 2019-10-02
@Chefranov

Should be like this:

<script type='application/ld+json'>
{
  "@context": "http://schema.org/",
  "@type": "Offer",
  "price": "2000",
  "priceCurrency": "RUB"
}
</script>

content is superfluous, it is not a derivative of offer for the price

D
Dmitry, 2019-10-02
@dimoff66

For each tag in the html 5 specification, a list of valid attributes is defined, for div it is most likely id, class, style and events. in your case data-content

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question