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.

Advertisements

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s