Link to home
Start Free TrialLog in
Avatar of daisydoos
daisydoos

asked on

Fancybox and HTML validation using HTML5

Hi,

I'm using Fancybox (1.3.4) for image animations on a site. Am using the rel attribute in order to group images for a slideshow:

<a rel="group1" title="title" href="pathtolargerimage"><img src="pathtoimage" width="150" height="150" alt="alt"/></a>

etc etc

However, if I validate the page get this error "Bad value group1 for attribute rel on element a: Keyword group1 is not registered."

Anyone else come across this problem - and have a solution?

Cheers,

Daisy

Avatar of Bardobrave
Bardobrave
Flag of Spain image

Easy, as you are using a value for rel attribute that's not into the expected values for this attribute the HTML validation returns an error.

Here you have the list of expected values:

http://www.w3schools.com/TAGS/att_a_rel.asp
The "rel" attribute has fixed values and therefore "group1" does not pass validation.

See: http://www.w3schools.com/tags/att_a_rel.asp

I would suggest grouping based on class or name/ID. Name and ID have to be unique, but you could use "GROUP1_IMAGE1" and only match part of the Name/ID.
Avatar of daisydoos
daisydoos

ASKER

Hi,

Bardoe - yes, I know this - sorry I should have explained this more in the question.

Ironhoofs - thanks for your answer; I looked the w3schools page before, and was using some attributes which prevented the javascript from functioning (I used nofollow) - but now using next and prev - and it works. Does it matter that I'm using these arbitary values for rel just to make the animation behave? The document validates as expected.


ASKER CERTIFIED SOLUTION
Avatar of Ironhoofs
Ironhoofs
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial