skip to Main Content

I’m creating a table of contents using the id linking method. How do I get it to work properly? I’ve triple checked and for some reason, it’s not responding when I click on the link.

I’ve tried creating an id and name within the tag. It only seems to work for the top of page id. I’m using Shopify’s blog editing feature which accepts HTML.

<a href="#Test">1. Example</a>    

<h3 id="Test">My Header Here</h3>    

I’ve got it to work before but it’s not anymore. Maybe I have to clear my cache?

2

Answers


  1. you just add height at your tag

    for example

    <html>
    
    <head>
    </head>
    
    <body>
        <div style="height:600px">
            <a href="#Test">1. Example</a>
        </div>
        <div style="height:600px">
                <h3 id="Test">My Header Here</h3>
            </div>
    </body>
    
    </html>
    
    Login or Signup to reply.
  2. The code is correct.
    What happens if you try the code below instead? Both of these should be valid, so it would be weird that one works and the other doesn’t.

    <a href="#Test">1. Example</a> 
    <a name="Test"><h3>My Header Here</h3></a>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search