Sachin Jain
Sachin Jain

Reputation: 21842

Meaning of property attribute in html

I just saw on one of the sites there is property attribute defined with some tags. For example:-

<span property="amount">100</span>

I searched on net but there was no property attribute as such on w3schools atleast. Can somebody please tell me what is it's role.

I am trying to run a simple html code but i don't understand its importance.

Can somebody please explain?

Upvotes: 7

Views: 1500

Answers (3)

Alohci
Alohci

Reputation: 82976

property is an RDFa attribute. What you are seeing is probably related to that.

See http://www.w3.org/2010/02/rdfa/sources/rdfa-lite/ Section 2.1 vocab, typeof, and property

Upvotes: 7

SLaks
SLaks

Reputation: 887415

That is not a standard attribute.
It's probably being used by custom code in that site.

It would be more correct to use a data-* attribute for such things.

Upvotes: 0

Quentin
Quentin

Reputation: 943510

It is non-standard, invalid code.

If it has a role, it will be specific to the site it appears on (probably for the benefit of that site's JavaScript).

If it was HTML5 then it would be data-property and not property.

Upvotes: 1

Related Questions