We help IT Professionals succeed at work.

Invalid DIV Tags?

Medium Priority
879 Views
Last Modified: 2012-08-14
Working wth VisualStudio 2010, .Net 4.0 and VB.Net

On a web page I inherited it has the following tag

<div style="float: left" class="fb-like" data-href="http://www.facebook.com/pages/ourpage/1234567893214569"
                            data-send="false" data-layout="button_count" data-show-faces="false">

I'm getting "Not a valid attribute of element 'div'"

Is this a HTML5 thing and how do I handle?
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019
Commented:
data- is an HTML5 specific enhancement for attributes that contain user defined data. You can put any attribute you like into a tag as long as you prefix it with 'data-'.

This will cause a validation error against old HTML specifications.

Make sure your doctype is set to html

<!doctype html>

Other than that you should be able to ignore them
Larry Bristersr. Developer

Author

Commented:
Perfect. Thanks guys

Explore More ContentExplore courses, solutions, and other research materials related to this topic.