W3C home > Mailing lists > Public > www-validator@w3.org > February 2010

Re: Custom attributes in HTML elements

From: Michael A. Peters <mpeters@mac.com>
Date: Thu, 11 Feb 2010 17:45:26 -0800
Message-id: <4B74B2B6.6050504@mac.com>
To: Claudia Murialdo <cmurialdo@gmail.com>
Cc: www-validator@w3.org
Claudia Murialdo wrote:
> Hi,
> I need to add a few custom attributes in some HTML elements, which is
> the best way to do it in order to keep validating with w3c validation
> service?.

use html 5 and the data-whatever attribute.

For example -

<div id="something" data-hook="whatever">
Received on Friday, 12 February 2010 01:46:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:39 GMT