Solved

W3C Validation Issue with data-pin-hover="true" and nopin="nopin"

Posted on 2013-10-25
3
755 Views
Last Modified: 2013-10-25
How can this be made to pass W3C's standards and validate correctly?

I cannot change the document type definition and the non-standard attributes are required.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demo</title>
</head>
<body>

<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/Pileated_Woodpecker!_mirrored_flying-pattern.svg/600px-Pileated_Woodpecker!_mirrored_flying-pattern.svg.png" alt="" nopin="nopin"/>
<br />
<img src="http://upload.wikimedia.org/wikipedia/commons/6/66/Fulvous-breasted_Woodpecker_(Dendrocopos_macei)_at_Kolkata_I_IMG_3848.jpg" alt="" />

<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js" data-pin-hover="true"></script>

</body>
</html>

Open in new window

0
Comment
Question by:hankknight
  • 2
3 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 250 total points
ID: 39600771
data-* is an HTML5 custom attribute, it is not valid in any other versions of HTML/XHTML as you are using so just change your doctype to
<!DOCTYPE html>
0
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 250 total points
ID: 39600889
You've kind of answered your own question:

How can this pass standards when using non-standard attributes!

Simple answer is - it can't. If you need non-standard attributes, then accept that it will fail standards validation
0
 
LVL 58

Expert Comment

by:Gary
ID: 39600900
Don't understand why you cannot change the doctype.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
"Go Fund Me" type plugin 5 24
ASP.NET Content Page 3 29
Copying table data to one another 15 31
How to make button inactive until I fill in all the boxes. 11 19
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question