Validation: Bad value first for attribute rel on element link

Bonnie picture Bonnie · Apr 21, 2013 · Viewed 12k times · Source

I'm using Piwigo photo gallery software and it dynamically generates some code in the head of the page, which displays like this:

<link rel="first" title="First" href="picture.php?/2601/category/37">
<link rel="prev" title="Previous" href="picture.php?/2619/category/37">
<link rel="next" title="Next" href="picture.php?/2621/category/37">
<link rel="last" title="Last" href="picture.php?/2760/category/37">
<link rel="up" title="Thumbnails" href="index.php?/category/37">

When I run it through the validator, I get errors as follows:

Line 21, Column 71: Bad value first for attribute rel on element link: The string first is not a registered keyword or absolute URL.
…" href="picture.php?/2601/category/37">  <link rel="prev" title="Previous" hre…

Line 21, Column 282: Bad value last for attribute rel on element link: The string last is not a registered keyword or absolute URL.
…" href="picture.php?/2760/category/37">  <link rel="up" title="Thumbnails" hre…

 Line 21, Column 348: Bad value up for attribute rel on element link: The string up is not a registered keyword or absolute URL.
…category/37">  <link rel="up" title="Thumbnails" href="index.php?/category/37">

After some reading, I have come to understand that HTML5 has removed rel up, first and last, though it has kept prev and next. What I don't understand though is what to replace up, first and next with? If I remove them completely, the validator isn't happy with that either.

Does anyone know? Thanks. :)

Answer

unor picture unor · Apr 23, 2013

In HTML5 you are only allowed to use the following values for the rel attribute:

If you need another link type, you would have to register it.


About the removal of first/index: Semantics of rel=first and rel=index breaks specs and implementations.