ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • HubPages Tutorials and Community»
  • Improving Your Article

Table of Contents

Updated on August 22, 2009

Creating a Table of Contents in your Hub

I'll probably write this and then the powers-that-be will create a Capsule to do in a few seconds what may take a while to create.

Which is fine by me! I wish there was such a capsule!

But in the meantime you can do it the way I've done it.

Why have a Table of Contents?

If you go to my hub on HubScore, and after what I call the Introduction Capsule, you'll notice that I have a capsule titled Table of Contents.

I figured that I have a long hub, and there's information there that people might want to go back to as a quick reference. Rather have them scroll through the entire hub they can browse through the Table of Contents list, click, and jump straight to the bit that they need.

To be quite honest I've put it there to make it easier for ME to find the information.

Links Capsule

I used the Links Capsule to pull it off.

You could probably use the Text Capsule to do it too.

It's important to note that while you're in edit mode the Table of Contents won't work properly. It won't jump you down on the same browser window. It'll open a new browser window. So keep that in mind.

Step 1.

Open up your hub. In the view that the general public sees (ie: not in edit mode).

Copy and paste your capsule titles into a Notepad text document (or whatever you feel like using) EXACTLY as they are. Make a list of the ones you want in your table of contents.

This is what it looks like when you right click in FireFox.
This is what it looks like when you right click in FireFox.

Step 2.

You now have to enter the alien world of HTML.

To do this you have to view the Page Source of your hub.

A reminder: make sure you're in the normal view of your hub, not in edit mode.

In Firefox you Right click and select View Page Source. In Internet Explorer you Right click and select View Source. It will open up a new page, like a Notepad text document.

Next you want to FIND each of the titles that you've copied and pasted. One at a time.

Now lets say you have a Capsule that you've titled "Café Royale", you want to search for that IN the source code.

The CTRL F keys should bring up the ability to do a search. Copy and paste Café Royale in and find it.

You'll find something like this:

<div id="mod_487697" class="module moduleImage"><h2>Café Royale2</h2>

If it's wrapped in the h2 tags, then that's more than likely our target! If it's not, then keep lookin (because you may have used the word more than once).

What you do next is "grab" the div id. In this illustration it is mod_487697.

Copy and paste that underneath the corresponding title in your Notepad doc. You'll be using it later.

Go through and find every div id for each of your titles. Copy and paste each one.

Step 3.

Now lets say your hub is http://hubpages.com/hub/Hubscore what you do next is add a # to the end of that and copy and paste http://hubpages.com/hub/Hubscore# to the start of each of your div id's that you have in your list.

So it would look like this: http://hubpages.com/hub/Hubscore#mod_487697

What you have now is a link that goes STRAIGHT to that module. Each of those "module ID's" are unique. Try it out with one of your own in the address field of your browser window.

BOOM. Straight there.

Step 4.

Now go into Edit Mode on your hub and add a Links Capsule. Move it to near the top. I position mine AFTER an introduction. I don't want people and particularly Search Engines to see it straight away. It being in second position seems like a good place to put it.

Now go through your Notepad list. Copy and paste each in Link URL/Link Title and Add Link. No need to add a Link Description. But that's up to you.

Keep doing that until it's all done.

Then of course save it.

And publish it.

And then try it.

How'd you go?

Hopefully it worked for you. It should. If it didn't then you've probably made an itty bitty mistake somewhere. HTML is unforgiving. You leave anything out or accidentally put anything in (even a space), and it won't work.

If you're unfamiliar with HTML it can be a bit daunting but if you've got a keen eye and a sense of adventure then keep at it and you'll get it right eventually.

Comments

Submit a Comment

  • Eric Seidel profile image

    Eric Seidel 2 years ago from Baltimore Maryland

    Thank you so much for this! Definitely cleans up a long Hub well. I now a new-found respect for people that actually make HTML code. I have to admit it was daunting at first, but your instructions were spot on and very helpful.

  • sara0129 profile image

    Shamim Rajabali 2 years ago from Texas

    Thanks for sharing this. I miss the TOC in Squidoo, it was so easy.

  • CruiseReady profile image

    CruiseReady 2 years ago from East Central Florida

    Many thanks for the wonderful instructions. Well done! A TofC is something I have managed to make on another site, but had no idea how to do it here.

  • JanieceTobey profile image

    JanieceTobey 2 years ago

    Thanks so much for this info on how to create a Table of Contents on Hubpages. I made them all the time on Squidoo....but the technique was just a little different because of differences in the two platforms. I'm excited to give it a try on Hubpages as well!

  • Adele Jeunette profile image

    Adele Jeunette 2 years ago

    It's nice that you've given instructions for this. I wonder of the gurus at Hub Pages can give us a way to generate this automatically. It was a really great feature we had in Squidoo. How about it, guys?

  • GonnaFly profile image

    Jeanette 2 years ago from Australia

    Ahhh. Perfect. Just what I was looking for. Thanks!

  • MacPharlain profile image

    MacPharlain 2 years ago

    The hacks are strong in this one.

    Thanks for the info, glad to see some of the old workarounds from the other site work here, too.

  • GypsyOwl profile image

    Deb Bryan 2 years ago from Chico California

    Brilliant! Thank you! I have a tutorial which needs to have links to sections because each person will be at a different step when they arrive. This is perfect! I had module links there when the lens transferred into a hub, but, no idea how to revise it. Thanks again! Deb

  • KarenHC profile image

    Karen 2 years ago from U.S.

    This is very helpful -- thanks! It does sound a little tedious to create, but there are a couple of ex-Squidoo lenses now hubs which will be more useful if they do have a TOC.

  • Susan300 profile image

    Susan300 2 years ago

    Bookmarking!!!! :)

  • TFScientist profile image

    Rhys Baker 3 years ago from Peterborough, UK

    Outstanding. Really easy to follow. I am adding this technique to my latest hub. Thanks for sharing such great advice

  • NateB11 profile image

    Nathan Bernardo 3 years ago from California, United States of America

    Very good, easy to follow instructions. Thanks for sharing.

  • SpaceShanty profile image

    SpaceShanty 3 years ago from United Kingdom

    Thank you sooo much! The only issue I had is that it puts them in reverse order, so you should start by adding the last link (bottom capsule) first. Apart from that it works like a dream!

  • Frank Sturm profile image

    Frank Sturm 3 years ago from Massachusetts

    Awesome article! Took me two seconds to figure this out, when I thought it'd take me forever. Definitely helps organize my longer hubs. Question: Does having a Table of Contents hurt your ranking with Google or Hub Pages because you are linking multiple times to your site? Not sure if that even makes sense.....

  • Evan Smiley profile image

    Evan Smiley 3 years ago from Oklahoma City

    This was so helpful!!! I'm new to making hubs, and I've been trying to find ways to make them easily-accessible and professional! This is great for my information dense hubs! Thank you so much! The foreign world of HTML is a little less scary!

  • RonElFran profile image

    Ronald E. Franklin 3 years ago from Mechanicsburg, PA

    I'm impressed with the way you presented your info - step-by-step with examples. I don't see how anyone could go wrong in following the process. Good job!

  • Ceres Schwarz profile image

    Ceres Schwarz 4 years ago

    This is really very useful. I agree that it would be great for long hubs to have a table of contents so that the readers can easily skip to and find what they're looking for. Your hub explained how to have a table of contents in a simple and concise manner. I'll be sure to try this on any hub that might need a table of contents.

  • sarahshuihan profile image

    Sarah 4 years ago from USA

    super awesome! I might have to try this when I write a long hub. I am definitely sharing this :)

  • seanorjohn profile image

    seanorjohn 4 years ago

    Will try to set this up. Great work. Voted up

  • rajan jolly profile image

    Rajan Singh Jolly 4 years ago from From Mumbai, presently in Jalandhar,INDIA.

    darkside, got it right the first time. Though it an extra bit of time and work it adds to the value of the hub I believe. I always wondered how to go about getting the internal linking done and this hub is just the answer.

    Thanks for this very useful and apt tutorial. Voting this up useful, awesome and interesting. Sharing it over so that others may benefit.

  • Lipnancy profile image

    Nancy Yager 4 years ago from Hamburg, New York

    Thank you so much. This is awesome. You are right though, the capsule in Squidoo is much easier. Voted up and Shared.

  • I Am Rosa profile image

    Rosa Marchisella 5 years ago from Canada

    OMG!!! That freaking AWESOME!!! THANK YOU!!! Must share with all my followers!

  • writeyourwrongs profile image

    John Crowley 5 years ago from Sheffield

    Just used this. Works a dream. Thanks again!

  • mom4autism profile image

    Lisa 5 years ago from Northeast U.S.

    Love this - voted up!

  • Julie DeNeen profile image

    Blurter of Indiscretions 5 years ago from Clinton CT

    Fantastic! Voted up and shared!

  • rajan jolly profile image

    Rajan Singh Jolly 5 years ago from From Mumbai, presently in Jalandhar,INDIA.

    Awesome hub. Bookmarked to reread later as I'm not good with html stuff.

    Thanks for sharing.

    Voted up, useful and shared.

  • profile image

    Ghostwolfe 5 years ago

    This is awesome, just tried it on one of my hubs and it is easy to do and doesn't take up a lot of time. Thank you for the information and for taking the time to write this hub. Voted Up.

  • Robie Benve profile image

    Robie Benve 5 years ago from Ohio

    Excellent information, very clearly explained. Thanks! :)

  • dragnhaze profile image

    dragnhaze 5 years ago

    Great information, I had read a hub from a different hubber who had explained how to put the anchor link in the text, but it did not work properly when I tried. I will have to give this a try for sure. Thanks for SHARING voted up and useful, interesting and awesome.

  • JamaGenee profile image

    Joanna McKenna 5 years ago from Central Oklahoma

    This is so cool! Years ago when I built web pages from scratch, I knew the code for "jump to" links, but had NO idea there was a way to do this in Hubpages!

    I don't have many hubs long enough to use this tip appropriately or effectively, but do have at least one that could use a TOC.

    Thanks! Voted UP and useful! ;D

  • wayseeker profile image

    wayseeker 5 years ago from Colorado

    Such wonderful information. You have a number of hubs that are just invaluable. Nice work and thank you!

    wayseeker

  • lobobrandon profile image

    Brandon Lobo 5 years ago

    Oh I'm back 2 months later. I bookmarked the hub for future reference and I'm going to use it on my next hub :)

  • M A Williams profile image

    Mike 5 years ago from New Hampshire

    Thank you! Thank you! Thank you!

    What a helpful and well put together hub.

    Hopefully hubpages adds tables of contents as an option one day, but in the meantime this will do :)

  • lobobrandon profile image

    Brandon Lobo 5 years ago

    Voted up, useful awesome and interesting. Thanks for this wonderful hub. Will try it out on my next hubs

  • smilingjimdickson profile image

    smilingjimdickson 5 years ago from Too close to the moon

    Hey Darkside, you've just stopped me scratching my head, the neighbours will think the fleas are cured. Seriously, I've been thinking about that all week and you've just answered it. Thanks!!!

  • brittanytodd profile image

    Brittany Kennedy 5 years ago from Kailua-Kona, Hawaii

    I just posted a forum about this! Thank you for posting; it really is an evergreen hub!

  • Rosie2010 profile image

    Rosie Rose 5 years ago from Toronto, Canada

    Wow! I always wanted to do this but didn't know how. Thank you so much, Darkside!

    Have a nice day,

    Rosie

  • prairieprincess profile image

    Sharilee Swaity 5 years ago from Canada

    Thank you so very much! I just found this from someone mentioning in the forums and it is excellent information! I just added a table of contents to one of my hubs and it is so much better! I think it might help with sales, too. Thank you again!

  • theseattlegirl profile image

    theseattlegirl 6 years ago from Seattle, WA

    Unbelievably useful. I mean, just EXACTLY what I was seeking! Thanks so much for taking the time to put this up. I write a few rather long hubs and even *I* get weary of scrolling through them.

    Ugh. Can't emphasize just how useful this is!

  • sofs profile image

    sofs 6 years ago

    This is so useful. I have struggled with internal linking for so long, I am book marking this for future reference.

  • hotwebideas profile image

    Bruce Chamoff 6 years ago from New York

    This works perfectly, Darkside, and I have linked to this hub for my followers to read. I am also following you now.

  • hotwebideas profile image

    Bruce Chamoff 6 years ago from New York

    Darkside, this works perfectly. Thanks. I have linked to this from my hubs and am now following you.

  • DzyMsLizzy profile image

    Liz Elias 6 years ago from Oakley, CA

    Oh, wow! I was referred to this hub by lronher, after a suggestion I made in the forums.

    Super cool! Bookmarked & voted up & useful! Thanks for this info! It will be a bit tricky for me, as I'm not a techie-type, but you've explained it clearly and with examples, so I should be able to manage!

    Thank you!

  • Sue B. profile image

    Sue B. 6 years ago

    Thank you! I found this very helpful! For some reason internet explorer would not show me the source information on hubpages yet I could review the source on other pages. Googlechrome worked so if that happens to anyone else- just try another browser.

  • saintodd profile image

    saintodd 6 years ago from Suffolk, VA

    BANG! I've been doing the table of contents without linking it on my hubs up to this point, its just how I like to organize my articles. Thanks for the tutorial - I'll be using it now until that capsule is made. Thanks. Voted up and ranked!

  • Howard S. profile image

    Howard S. 6 years ago from Dallas, Texas, and Asia

    Oh, yes! I knew this should be possible, and there is a series of hubs I want to do that is hopeless without it. I finally saw it in someone else's hub and she pointed me here. Thanks!

  • WriteAngled profile image

    WriteAngled 6 years ago from Abertawe, Cymru

    Oh thank you, thank you!!! This is exactly what I needed in a hub I finished today.

  • dannylardon164 profile image

    dannylardon164 6 years ago

    Thanks a lot, DarkSide. I have an immensely long Hub on astrobiology that needed a navigation section.

  • WoodsmensPost profile image

    WoodsmensPost 6 years ago from Arizona

    How cool is that. I just tried it on one of my hubs fantastic!!!! Bookmarked Voted Up Awesome!!!

  • dubturbo profile image

    dubturbo 7 years ago

    Thanks Darkside for the informative method. I will try it on my first hub as I just became a hubber. Too bad HupPages does not offer a capsule to do this automatically.

  • darkside profile image
    Author

    Glen 7 years ago from Australia

    Glad to be of service Josh. But no donations required.

  • Josh2008 profile image

    Josh2008 7 years ago from London

    Thank you for this one DarkSide.

    Not remotely surprised that this one's come from you.

    Love the HubScore post as well.

    Got a donate button somewhere?

  • bhagwad profile image

    Bhagwad Jal Park 7 years ago from Chennai, India

    Just used this for my own hub - thanks a whole lot

  • bhagwad profile image

    Bhagwad Jal Park 7 years ago from Chennai, India

    I just wish they had a capsule for this! Squidoo does it automatically for you and I miss that functionality!

  • ss sneh profile image

    ss sneh 7 years ago from the Incredible India!

    Hi! Very useful info. In fact I made a table of content on one of my site with texts but would have made with links had I read this hub before...Now I can --Thanks for the Info!

  • FindYourSearch profile image

    FindYourSearch 7 years ago from Las Vegas, NV

    Great information; exactly what I was looking for. I put a table of contents on my intro to SEO hub. Thank you!

  • darkside profile image
    Author

    Glen 7 years ago from Australia

    It depends on how much information and how well you need it organised.

    I've used it on hubs that have me coming back to quickly find the right spot to share with others, that way I can also do a Copy Location and post the URL into a forum post. If it makes it easier for me to navigate through the hub, then it'll be easier for others. But I wouldn't use it on every single hub I've made, in fact I've probably only got it on half a dozen.

  • N. Ramius profile image

    N. Ramius 7 years ago

    When do you think you should use the Table of Contents? How long of a hub?

  • Eileen Hughes profile image

    Eileen Hughes 7 years ago from Northam Western Australia

    Darkside, thanks for the confidence from one grandma to another. I will have to try it now wont I

  • 2Tony profile image

    Tony Casey 7 years ago from Manchester U.K.

    Just found this, done it, love it, works great.

    Explained really well, how can I repay you;

    If you need to know how to run a guest house i'm your man.

    wellllllll.

  • sunforged profile image

    sunforged 7 years ago from Sunforged.com

    The Firebug add-on for firefox would allow you to simply point the cursor at whatever page elements you would like to inspect, its worth a view if you haven't seen it before.

  • DevinG profile image

    DevinG 7 years ago from Redlands

    I would like to thank you very much for this hub. It has helped me immensely with my Mousehunt guide hubs. Again, thanks a lot and this is great to know. *thumbs upped*

  • Sufidreamer profile image

    Sufidreamer 7 years ago from Sparti, Greece

    Top notch, Darkside - worked a treat :)

  • Appletreedeals profile image

    Appletreedeals 7 years ago from Salisbury, Maryland USA

    oops. forgot the ps.

    ps. bookmarked it for a backlink

    GA

  • Appletreedeals profile image

    Appletreedeals 7 years ago from Salisbury, Maryland USA

    OK, people fuss that short "great hub" comments aren't really contributory, but ... anything else, here, would just be filler, thanks for the info, and effort, of course I will use this. I will shamelessly pick anybody's brain, and I never leave a good idea un-copied. Rated hub "up"

    GA

  • thisisoli profile image

    thisisoli 7 years ago from Austin, Texas (From York, England!)

    Great hub, I was tearing my hair out trying to figure out how to make these links for my Hub!

  • darkside profile image
    Author

    Glen 7 years ago from Australia

    It takes a little fiddling Lou, but once you're done, you're done!

  • lou16 profile image

    lou16 7 years ago

    Oh wow, thank you Glen. Now I can go back to a couple of my hubs and make a few changes and I can also make a few hubs that I thought might be too long - awesome!

  • mel22 profile image

    mel22 7 years ago from ,

    Wow, this is one of the mosat valuable and well written hubs I have seen yet! Wish we were able to rank the hubs on a score of 1-100. I'd give this one 110!

  • MistHaven profile image

    MistHaven 7 years ago from New Jersey

    Thanks, man. Now I finally know how to add a table of contents to my Hubs.

  • Tim Blackstone profile image

    Tim Blackstone 7 years ago

    This is a great explanation of how to do it and really useful thanks.

  • guidebaba profile image

    guidebaba 8 years ago from India

    Fantastic. You solved my problem. Thumbs Up for you.

  • SimeyC profile image

    Simon Cook 8 years ago from NJ, USA

    Yes this is exactly what I wanted! Thanks

  • darkside profile image
    Author

    Glen 8 years ago from Australia

    The # seperates the URL from the module number. It is the anchor. It's telling it to go down to the module number that's in the source code.

  • profile image

    sandra rinck 8 years ago

    I just wanted to say one thing because I can be a dingy sometimes...most of the time.

    On the part where you put a #. Can you clarify? I spent like 20 minutes putting a number 1 in instead of a #. LOL. :D

    But super, it works!

  • profile image

    sandra rinck 8 years ago

    Thanks for seemingly having a hub for just about everything I need to know. You are aw....sssss.....oooommmmeeee! :D

  • Lily Rose profile image

    Lily Rose 8 years ago from East Coast

    This is so cool - I would never had known how to do this without your hub. I followed your step by step instructions and just implemented a TOC on one of my longer hubs without a glitch. I'm a huge fan of yours right now - thanks!

  • Jerilee Wei profile image

    Jerilee Wei 8 years ago from United States

    Glad I read this! This kind of article is the type I crave as it is very difficult when you are my age (60) to keep up with all of this without a guideline.

  • blondepoet profile image

    blondepoet 8 years ago from australia

    Thankyou so so much I never saw your reply for ages as they are going the opposite way up ROFL

  • packerpack profile image

    Om Prakash Singh 8 years ago from India, Calcutta

    Oh that is a great help. I didn't know that each capsule is already given an id (e.g. mod_487697). All this while I was thinking how to make Hubpages do that. Good little research. Thanks man!

  • traceye profile image

    traceye 8 years ago from Australia

    wow great hub. Darkside I've just become a massive fan of you. Keep up the good work.

    Tracey

  • darkside profile image
    Author

    Glen 8 years ago from Australia

    Blondepoet, that one is easier than what's required to make a Table of Contents. Just go to their profile page and copy the URL in the web address field of your browser, come back and highlight the Hubbers name in your Text Capsule and click on the chain icon in your editor. Or if it's a Links Capsule you just do it as you'd do any other links.

  • blondepoet profile image

    blondepoet 8 years ago from australia

    Maybe you can help me, how do I change the name of a hubber that I have mentioned in my Hub so that when the reader clicks on their name there profile page will open?

  • blondepoet profile image

    blondepoet 8 years ago from australia

    darkside maybe you can help me. In my Hub I mention quite a few Hubbers. How can I put their name in, well their name is already in for eg.

    Tom Rubenoff

    (paragraph about him) so that when you click on his name his profile page will come up, I see this getting done all the time

  • Susan Ng profile image

    Susan Ng Yu 8 years ago from Cebu, Philippines

    Yes, I did it! :D Thanks, darkside. :)

  • moonbun profile image

    moonbun 8 years ago from London

    I've used this hub for reference so many times and I've never said thanks. So a belated thank you for such a useful hub :)

  • BristolBoy profile image

    BristolBoy 8 years ago from Bristol

    This is a really useful hub. Thanks for writing it!

  • profile image

    multimastery 8 years ago

    This is wayyy cool gotta try it ~ Thanks!

  • profile image

    multimastery 8 years ago

    Hey darkside thanks for enlightening us...definitely gotta try it one of these days!

  • aidenofthetower profile image

    aidenofthetower 8 years ago

    It certainly sounds like a lot of work, but considering the advantage on a longer hub (which I tend to write) it is probably worth it! Thanks

  • wannabwestern profile image

    Carolyn Augustine 8 years ago from The Land of Tractors

    Brilliant, Darkside. Thank you!

  • anime_nanet profile image

    anime_nanet 8 years ago from Portugal

    Fantastic hub! I have at least one long hub where I will implement this!

    Thanks to Shibashake as well. If I hadn't read is hub of the Do and Dont's maybe I never found this one!

  • sri krsna profile image

    sri krsna 9 years ago from Philippines

    Thanks for the graet info I will try do this one..,.

  • profile image

    RUTHIE17 9 years ago

    Darkside--Just found this Hub----thank you sooooo much!  I use HTML quite a bit on Squidoo and a few other sites and really miss it here at HubPages.  Wish they would include a simple HTML option for those who want it.  Maybe someday!!

    Again, thanks!!

    Eileen--trust me, if this Grandma can do it so can you. It's not that hard if you just take your time and be sure to do EVERY step as written. I knew NO HTML 3 months ago and was even scared of the letters,(lol) but I'm doing all sorts of things now! It's sort of like a giant puzzle you have to put together in the right order! You can do it, gal!

  • Eileen Hughes profile image

    Eileen Hughes 9 years ago from Northam Western Australia

    Thanks darkside, I like it, but may be too much for this old biddie but will have to have a go just the same. Having fun in here. And like they say never to old to learn new tricks.

  • MyGenie profile image

    MyGenie 9 years ago

    I love the step-by-step with graphics, best way to learn.

    Thanks!

  • darkside profile image
    Author

    Glen 9 years ago from Australia

    No payback needed. Go hub and prosper.

  • DJ Funktual profile image

    DJ Funktual 9 years ago from One Nation Under a Groove

    Wow. I am gonna be up all night til I fihure this out, thanks darkside. I don't know you're tastes but Id's be happy to write anything to like to pay you back.

  • Evolving1 profile image

    Evolving1 9 years ago from United States

    Thank you!!!

    I've just recently published my first Hub and have been reading up on various ways to improve my page... primarily through more experienced Hubbers like yourself. =)

    I just finished implementing the TOC steps you outlined, and am very happy with the results. As time goes by, I'll understand the art of presentation... but until then - I think your suggestion will make it MUCH easier for people to enjoy info-packed hubs!!

  • About-The-Home profile image

    About-The-Home 9 years ago

    That's brilliant darkside !! Just what I was looking for.