Equivalent of LaTeX's \label and \ref in HTML.

Posted by dreeves on Stack Overflow See other posts from Stack Overflow or by dreeves
Published on 2009-08-16T07:44:08Z Indexed on 2010/05/29 20:02 UTC
Read the original article Hit count: 300

I have an FAQ in HTML (example) in which the questions refer to each other a lot. That means whenever we insert/delete/rearrange the questions, the numbering changes. LaTeX solves this very elegantly with \label and \ref -- you give items simple tags and LaTeX worries about converting to numbers in the final document.

How do people deal with that in HTML?

ADDED: Note that this is no problem if you don't have to actually refer to items by number, in which case you can set a tag with

<a name="foo">

and then link to it with

<a href="#foo">some non-numerical way to refer to foo</a>.

But I'm assuming "foo" has some auto-generated number, say from an <ol> list, and I want to use that number to refer to and link to it.

© Stack Overflow or respective owner

Related posts about html

Related posts about documentation