How to use HTML anchors as a table of contents in email when rendered in clients like Groupwise or Gmail?

后端 未结 2 1150
忘了有多久
忘了有多久 2021-01-19 01:39

I would like to put a table of contents at the top of an internal email newsletter that will allow readers to \'jump\' down to the part of the newsletter th

相关标签:
2条回答
  • 2021-01-19 01:46

    I found this post when trying to accomplish the same thing, and I followed instructions here to get it to work: http://blog.mailermailer.com/tips-resources/anchor-tags-html-emails

    This is the code I ended up with in the first successful test:

    <html>
    <a name="BACKTOTOP">Index</a>
    <ul>
    <li><a href="#COMPLIANCE">Compliance Courses</a></li>
    <li><a href="#DEALERTRAINING">Dealer Training</a></li>
    <li><a href="#FUNCTIONALAREA">Functional Training Courses</a></li>
    <br>
    <h1>
    <a name="COMPLIANCE">Compliance</a>
    </h1>
    <br>
    This will be the message for Compliance courses.
    <br>
    <a href="#BACKTOTOP">Return to top index</a>
    <br>
    <h1>
    <a name="DEALERTRAINING">Dealer Training</a>
    </h1>
    <br>
    This will be the message for Dealer Training.
    <br>
    <a href="#BACKTOTOP">Return to top index</a>
    <br>
    <h1>
    <a name="FUNCTIONALAREA">Functional Training Courses</a>
    </h1>
    <br>
    This will be the message for courses by Functional Area.
    <br>
    <a href="#BACKTOTOP">Return to top index</a>
    </html>
    
    0 讨论(0)
  • 2021-01-19 02:11

    Try adding the 'name' attribute to the anchor as well as the 'id'.

    <a id="FUNDING" name="FUNDING">
    
    0 讨论(0)
提交回复
热议问题