Skip to content

Instantly share code, notes, and snippets.

@hcmn
Created July 17, 2012 22:35
Show Gist options
  • Save hcmn/3132602 to your computer and use it in GitHub Desktop.
Save hcmn/3132602 to your computer and use it in GitHub Desktop.
HTML5: data type attribute
//"Custom data attributes are intended to store custom data private to the page or application,
// for which there are no more appropriate attributes or elements."
// - dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data-with-the-data-attributes
//Examples below:
<div data-type="sprite" data-offsetY="100" data-Xposition="50%" data-speed="2"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment