Skip to content


Subversion checkout URL

You can clone with
Download ZIP


HTML5 Compatibility for Footnotes #4

merged 1 commit into from

3 participants


The link that renders with footnotes to jump back to the main content uses the "rev" attribute, which has been removed in HTML5 (see The recommendation is to use the "rel" attribute with a name meaning the opposite of it's partner "rel" attribute. Therefore, since the footnote link has rel="footnote" I changed the return link to rel="reference". Can you think of a better value for this?



Looks good to me.


Just noticed this has been sitting open for awhile. Can someone please either accept it or close it so I can update from my fork? Thank you!

@gettalong gettalong merged commit b3b2ebc into gettalong:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 11, 2011
  1. Replace rev attribute for HTML5 compatibility

    Joe Fiorini committed
This page is out of date. Refresh to see the latest.
2  lib/kramdown/converter/html.rb
@@ -393,7 +393,7 @@ def footnote_content
li.children = Marshal.load(Marshal.dump(data.children))
ol.children << li
- ref =, "<a href=\"#fnref:#{name}\" rev=\"footnote\">&#8617;</a>")
+ ref =, "<a href=\"#fnref:#{name}\" rel=\"reference\">&#8617;</a>")
if li.children.last.type == :p
para = li.children.last
4 test/testcases/span/04_footnote/footnote_nr.html
@@ -3,10 +3,10 @@
<div class="footnotes">
<ol start="35">
<li id="fn:ab">
- <p>Some text.<a href="#fnref:ab" rev="footnote">&#8617;</a></p>
+ <p>Some text.<a href="#fnref:ab" rel="reference">&#8617;</a></p>
<li id="fn:bc">
- <p>Some other text.<a href="#fnref:bc" rev="footnote">&#8617;</a></p>
+ <p>Some other text.<a href="#fnref:bc" rel="reference">&#8617;</a></p>
10 test/testcases/span/04_footnote/markers.html
@@ -17,7 +17,7 @@
<div class="footnotes">
<li id="fn:fn">
- <p>Some foot note text<a href="#fnref:fn" rev="footnote">&#8617;</a></p>
+ <p>Some foot note text<a href="#fnref:fn" rel="reference">&#8617;</a></p>
<li id="fn:3">
<p>other text
@@ -26,21 +26,21 @@
<p>and a quote</p>
- <p><a href="#fnref:3" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:3" rel="reference">&#8617;</a></p>
<li id="fn:1">
- <p>some <em>text</em><a href="#fnref:1" rev="footnote">&#8617;</a></p>
+ <p>some <em>text</em><a href="#fnref:1" rel="reference">&#8617;</a></p>
<li id="fn:now">
<pre><code>code block
continued here
- <p><a href="#fnref:now" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:now" rel="reference">&#8617;</a></p>
<li id="fn:empty">
- <p><a href="#fnref:empty" rev="footnote">&#8617;</a></p>
+ <p><a href="#fnref:empty" rel="reference">&#8617;</a></p>
Something went wrong with that request. Please try again.