Solved

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

Posted on 2013-10-25
3
740 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tutorial for ebay api 3 32
Mobile page Scrolling down when refreshing 4 26
How to show span when clicked on? 10 19
JavaScript let vs var 5 21
This article discusses how to create an extensible mechanism for linked drop downs.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
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…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

786 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