7

The title should be relatively straightforward, but is it possible to set the id of, say, a header in your question/answer?

That is, is it possible to get ## some header to render as <h2 id="some-id">some header</h2>? I know the Markdown converter kramdown allows one to do this like:

## some header {: id="some-id"}

The use case would be providing an easier way to jump around a very long question/answer where only some aspects of the question/answer might be relevant for future users of the site.

If this does not exist, it might be a useful feature to implement. For example, I just answered a question about knitr and TikZDevice where the main problem raised in the question—setting font sizes with TikZDevice via knitr— was addressed late in the answer because the question also demonstrated some problems with LaTeX code and beamer which had to be addressed first. However, since many future users might only need to look at the part about font sizes, knitr, and TikZDevice it would be useful if there was an easy to have them jump directly to that bit of the answer. This would be in line with the idea of making this site a repository of knowledge, rather than a 'mere' Q&A forum.

Thus, if this feature doesn't exist, I guess this is a .

  • 2
    This would be especially helpful for single, long-answer posts to FAQs. – Werner Jun 18 '14 at 5:25
  • I think security is the concern in this type of actions hence the subset of HTML. – percusse Jun 18 '14 at 15:16
  • There is this old post on Meta Stack Exchange (Adding ID attributes to content in tag wikis?), which is specifically about content in tag wikis, but it seems relevant. Unfortunately, it's old and seems to have not received much attention. I couldn't find much else on Meta Stack Exchange, though I didn't look that hard. – Adam Liter Jun 27 '14 at 1:12

You must log in to answer this question.

Browse other questions tagged .