Skip to main content
added 253 characters in body
Source Link
Jeff Atwood
  • 311.4k
  • 107
  • 889
  • 1.3k

What is the correct syntax here? Where is this documented in the HTML 4.01 spec?

Ah, found it:

http://www.w3.org/TR/html401/struct/links.html#h-12.3

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
  <TITLE>Chapter 2</TITLE>
  <LINK rel="Index" href="../index.html">
  <LINK rel="Next"  href="Chapter3.html">
  <LINK rel="Prev"  href="Chapter1.html">
</HEAD>
...the rest of the document...

but wait -- only the oddball <link> tag? Does this syntax work for hyperlinks?

<a href="http://example.com" rel="next">

That's easiest, anything else and this is not worth doing.

edit: the op specifically said

all the next/prev links at the bottom of SO pages had rel=next / rel=prev on them

We already do rel="tag" on links that are tags, so I am going to do the same for the pagination next and previous links.

What is the correct syntax here? Where is this documented in the HTML 4.01 spec?

Ah, found it:

http://www.w3.org/TR/html401/struct/links.html#h-12.3

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
  <TITLE>Chapter 2</TITLE>
  <LINK rel="Index" href="../index.html">
  <LINK rel="Next"  href="Chapter3.html">
  <LINK rel="Prev"  href="Chapter1.html">
</HEAD>
...the rest of the document...

but wait -- only the oddball <link> tag? Does this syntax work for hyperlinks?

<a href="http://example.com" rel="next">

That's easiest, anything else and this is not worth doing.

What is the correct syntax here? Where is this documented in the HTML 4.01 spec?

Ah, found it:

http://www.w3.org/TR/html401/struct/links.html#h-12.3

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
  <TITLE>Chapter 2</TITLE>
  <LINK rel="Index" href="../index.html">
  <LINK rel="Next"  href="Chapter3.html">
  <LINK rel="Prev"  href="Chapter1.html">
</HEAD>
...the rest of the document...

but wait -- only the oddball <link> tag? Does this syntax work for hyperlinks?

<a href="http://example.com" rel="next">

That's easiest, anything else and this is not worth doing.

edit: the op specifically said

all the next/prev links at the bottom of SO pages had rel=next / rel=prev on them

We already do rel="tag" on links that are tags, so I am going to do the same for the pagination next and previous links.

Source Link
Jeff Atwood
  • 311.4k
  • 107
  • 889
  • 1.3k

What is the correct syntax here? Where is this documented in the HTML 4.01 spec?

Ah, found it:

http://www.w3.org/TR/html401/struct/links.html#h-12.3

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
  <TITLE>Chapter 2</TITLE>
  <LINK rel="Index" href="../index.html">
  <LINK rel="Next"  href="Chapter3.html">
  <LINK rel="Prev"  href="Chapter1.html">
</HEAD>
...the rest of the document...

but wait -- only the oddball <link> tag? Does this syntax work for hyperlinks?

<a href="http://example.com" rel="next">

That's easiest, anything else and this is not worth doing.