I'd suggest using data
-family attribute here, like this:
<a class="fancybox" data-gallery="1" href="images/rs1.jpg">R.S.Lynch & Company</a>
<a class="fancybox" data-gallery="1" href="images/rs2.jpg">...</a>
<a class="fancybox" data-gallery="1" href="images/rs3.jpg">...</a>
<a class="fancybox" data-gallery="1" href="images/rs4.jpg">...</a>
<a class="fancybox" data-gallery="1" href="images/rs5.jpg">...</a>
... as this type of attribute was designed specifically for attaching some data to DOM elements. It's more semantic than using class
, in my opinion.
You can easily access these values with $('some selector').data('gallery')
syntax.
As for rel
attribute, it looks like in HTML5 it's restricted to the set of predefined attributes, and is used to define more high-level relationships between documents.