Did you know that blog is short for weblog? Thank us when you’re on Jeopardy.
HTML5 provides several conventions that help simplify markup and create more digestible, standards-compliant code. Specifically, we now have the ability to add custom data attributes to HTML elements. Each custom data attribute we create consists of two parts:
1. An attribute name
Read More →
Data attribute names must be at least one character long and must be prefixed with 'data-'. Data attributes must not contain any uppercase letters.
2. An attribute value
An attribute value can be any appropriate string.
Consider the following scenario:
http://jcb.wefixedthisforyou.com/images/datablog/1.jpg" alt="1" width="575" height="265">
http://jcb.wefixedthisforyou.com/images/datablog/2.jpg" alt="2" width="575" height="265">
Simple enough. We store the list in a variable, then we can access which attributes we need using the dataset p...