Playing with html

So I’m trying to figure out a new bit of code that will let me link within posts. It should allow me to make a contents list or just provide a quick link to a relevant part of a long post.

<h4>Contents</h4>
<code><ul>
<li><a href=”#Example1″>Example 1</a></li>
<li><a href=”#Example2″>Example 2</a></li>
<li><a href=”#whateveryouwant”>link text of your choice</a></li>

</ul></code>

Should give:

The anchor text is preceded by <a name=”insertanchor”>anchor text here</a>

The name anchor does not need the # but the link text does.
So let’s try it

<a name=”insertanchor”>anchor text here</a>

BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah

BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah

BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah

 

Example 1

BlahBlahBlahBlahBlahBlahBlahBlah

BlahBlahBlahBlahBlahBlahBlahBlahBlah

BlahBlahBlahBlahBlahBlahBlahBlahBlahBlahBlah
link text of your choice

This is not working for me. The links just drop me at the comment form or below it.

Hmm back to the drawing board.

2 thoughts on “Playing with html

  1. Hi Linda, the links in the page above do work. When you click on the first one (Example1), it takes you to the Example1 anchor (before “Example 1…BlahBlahBlahBlahBlahBlahBlahBlah”) and shows it at the top of the page (and the comment form at the bottom) . When you click on the other link (link text of your choice) puts the link text of your choice anchor at the top of the page (link text of your choice…This is not working for me). Is this what you wanted it to do?

Leave a reply to Gareth Cancel reply