Jump to content

How do I create a footnote


htmlnewbie23
 Share

Recommended Posts

It's not needed for the link to point to an "anchor". It could be any element with that ID.A link pointing to "#paragraph" would point to the element in the document that has 'id="paragraph"' regardless of whether the element is an achor (<a/>), a paragraph (<p/>), or something else.

Link to comment
Share on other sites

It's not needed for the link to point to an "anchor". It could be any element with that ID.A link pointing to "#paragraph" would point to the element in the document that has 'id="paragraph"' regardless of whether the element is an achor (<a/>), a paragraph (<p/>), or something else.
Thank you for replying. Unfortunately I am not that expert and have never used IDs with elements and therefore am confused. Could you provide an example coded in html which would demonstrate how I should do this?Thanks.
Link to comment
Share on other sites

<a href="#footer" id="top">Go to footer</a>...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br />...<br /><div id="footer">When you click the "Go to footer" link on the <a href="#top">top of the page</a>, you'll end up here.</div>

Link to comment
Share on other sites

Worked like a charm and I learned a lot. Thank you.Now this is pushing it but I will ask anyway. In many word processors, when one clicks on a footnote marker it takes you to the footnote (just like what I just implemented does). But, if one then clicks on the number of the footnote itself, it takes you back to where in the text that footnote marker was found so you can continue reading where you left off. I am sure I can implement this in html just by using the same technique I used for creating the footnote links, but that would need a lot of additional code work for each footnote, and I have a lot of footnotes. So, I thought to ask: is there a simple way to do this automatically? (That's why I originally asked if there was a "footnote tag" that would automatically create the back and forth links in one step). If not, I may just create a link to "Back to top of text", though this does not really accomplish what I need if the footnote number is further down on the page.Just trying to learn.

Link to comment
Share on other sites

Worked like a charm and I learned a lot. Thank you.Now this is pushing it but I will ask anyway. In many word processors, when one clicks on a footnote marker it takes you to the footnote (just like what I just implemented does). But, if one then clicks on the number of the footnote itself, it takes you back to where in the text that footnote marker was found so you can continue reading where you left off. I am sure I can implement this in html just by using the same technique I used for creating the footnote links, but that would need a lot of additional code work for each footnote, and I have a lot of footnotes. So, I thought to ask: is there a simple way to do this automatically? (That's why I originally asked if there was a "footnote tag" that would automatically create the back and forth links in one step). If not, I may just create a link to "Back to top of text", though this does not really accomplish what I need if the footnote number is further down on the page.Just trying to learn.
Unfortunatly, no. There's no way to do it automatically. At best, you can create one link that references back another link, and that for each pair of footnote and text. That is, the same as the sample I gave you, but with the "div" being a link instead.There are other languages, DocBook for one I think, that support footnotes, but you can't use them in a browser. Instead, you must use a third language (like XSLT for example) to convert them into the equivalent (X)HTML. And unless you're writing a 200+ pages specification, it's probably not worth it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...