PDA

View Full Version : How To:Table of Contents?



Jayy962
Feb 5th, 2010, 05:25 AM
I basically just started experimenting with HTML and CSS and I wanted to create a tutorial for the site im creating. What I want help with is the table of contents that I want to place at the top. I was thinking of having links as the table of contents that sent the client further down the page. How do I create a link that can direct someone further down the page.

abduraooft
Feb 5th, 2010, 09:15 AM
How do I create a link that can direct someone further down the page. See http://www.w3.org/TR/html4/struct/links.html#h-12.2.3

Excavator
Feb 5th, 2010, 09:25 AM
Hello jayy962,
It's pretty much like a regular anchor... only instead of a path to an outside page, you direct it to an anchor on your page with a #.

In your Table of Contents, make a link that looks like this - <a href="#chapter7">Chapter Seven</a>

Way down the page, at the start of Chapter7, place your anchor that looks like this - <a name="chapter7">Chapter Seven</a> (you can style that like any heading by placing heading tags around it)