user433500
user433500

Reputation: 385

Strange attribute in DIV tag

I am seeing some attribute I have never seen before in a div tag. I haven't touch html for a while but googling the attribute didn't return much useful info.

    <div dataquery="#item_1306"  comp="box.components.Flashplayer" id="box_Flashplayer_2"     propertyquery="#box_Flashplaye_2" class="box_Flashplaye_style2"...

My question is, do you know what are these "dataquery" "comp" and "propertyquery" attributes?

Thanks alot folks.

Upvotes: 5

Views: 1147

Answers (3)

Sameera Thilakasiri
Sameera Thilakasiri

Reputation: 9508

Those are not W3C attributes, they have used to perform some task, may be to the lagulage it used and may performance some special tags, But its not best practice because it gives HTML validation errors, better thing is use data-xxxx tag for extra attributes.

More readings. http://www.javascriptkit.com/dhtmltutors/customattributes.shtml http://ejohn.org/blog/html-5-data-attributes/ http://html5doctor.com/html5-custom-data-attributes/

Upvotes: 0

Andreas
Andreas

Reputation: 2366

You can add you own attributes to elements. I don't think theese atributes are standard attributes lika class and name but an attribute that the programmer has added self for some purpose.

Upvotes: 0

scravy
scravy

Reputation: 12283

HTML is often enhanced with custom attributes these days, and HTML5 explicitly allows for that. Normally these attributes should be prefixed with "data-", but obviously this is not the case here.

The meaning depends most probably on a script included in the page.

For example, in twitter bootstrap it is common to see attributes like <body data-spy='scroll'> which is than interpreted by a script and allows for monitoring the amount a user scrolls.

When including Facebook like buttons you may have attributes like data-style which controls whether a box, or a button, or hwatever is used.

Upvotes: 5

Related Questions