Html – Lightbox gallery rel with array parameter validation

htmlw3c-validation

I am trying to validate a page in which I have implemented Lightbox and W3C thinks rel="lightbox['gallery']" is invalid code. Code is :

<a rel="lightbox" href="link-to-image">
...image...
</a>

Error:

Bad value lightbox for attribute rel on element a: Keyword lightbox is not registered.

Any insight into this is welcomed.

Best Answer

At least for me it's more comfortable to use "target" instead of "rel" or "data-rel" (which is not a standard link attribute anyway), thus still pass w3 HTML5 validation and do not mess with page's CSS setup ("class" is commonly used for layout and such). Of course all "*.getAttribute('rel')" in javascript source has to be updated accordingly.

Related Topic