I’m trying to figure out how to do this in markdown on here. How do you create a link that jumps(scrolls) to that heading in the post when clicked on?

  • Ensign_Seitler@startrek.website
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    20 days ago

    This involves some HTML in your Markdown, but isn’t very difficult. You’re just going to add an anchor tag (with an ID but no href) immediately above the heading, like so:

    <a id=“some_examples”></a>
    ## Some Examples
    

    When you’ve got that, you can just use the anchor in a Markdown link:

    I’ve provided a few [examples](#some_examples) to illustrate this concept.
    
    • Lumini@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      20 days ago

      I think I’m doing it wrong since its still not working, can the ID be anything? The HTML is still visible over the heading when saved for some reason