How to Generate a Table of Contents in Knol

Editing hints

Knol automatically generates a Table of Contents out of any H1, H2, H3 or H4 tags present in your document.


How to Create a Table of Contents


Knol creates a table of contents automatically for you, based on your use of the Heading, Subheading, and Minor Heading styles in the Format menu. These correspond to the HTML tags H2, H3, and H4 respectively.

So, simply follow these steps:
  • Select your major headings, and assign them the style Heading (H2)
  • Select your subheadings, and give them the style Sub-Heading (H3)
  • Select your minor headings, and use Minor Heading (H4)
  • And, you're done! Save the page and close out of the editor, and you will see the results.

    Best Practices

    • Write short headings. There is limited horizontal space within the Table of Contents area, so verbose headings are counterproductive. Notice that this heading "This is Minor Heading H4 ... again" just barely fits.
    • Avoid using ALL CAPS.
    • We recommend using no more than 10 top level headings (H2). 10 is the maximum which will display within the Table of Contents area. If you do provide more than 10 headings, users will be able to expand the Table of Contents display by clicking on the "more" link, which is automatically provided. It is counterproductive to use more than 100 total headings in a knol, counting H2, H3 and H4 headings all together. If your document is that lengthy or complex, it would be best to split it into multiple knols, at chapter boundaries.

    FAQs about the Table of Contents

    Q: Why just H2, H3, and H4. What happened to H1?

    The "H1" HTML tag is not available in the Format menu. We do not recommend introducing H1 tags into your document content area since H1 tags are intended for use as document titles.

    (Suppose you want to ignore our advice and introduce an H1 tag anyway. Well, you could do so using the HTML editor (on the far right hand side of the editor toolbar), or by cutting-and-pasting content from another editor. However, we do not recommend doing that.)

    Q: Why does the Table of Contents keep appearing and disappearing?

    The table of contents is only visible in View mode. It is hidden when you go into Edit mode.

    Q: How can I turn off the automated "Content" function?

    You can turn off the Table of Contents on individual knols, as well as make that your default for future pages. Mange the knol's settings, in the general panel, under interactions. See here.

    Some Examples


    Example use of the H2, H3 and H4 formatting styles.

    Here are some example headings. Notice the table of contents which they generate (under the Email and Print links at the top of this page.)

    This is Heading H2

    This is Subheading H3

    This is Minor Heading H4

    Normal paragraph text here. This doesn't appear in the Table of Contents.

    This is Minor Heading H4

    More normal text.

    This is Heading H2 ... again

    This is Subheading H3 ... again

    This is Minor Heading H4 ... again



    Comments

    Request: Edit at Heading

    Please take a lesson from wikipedia etc. and give editors the option of editing at the Heading H2 and H3 level.

    example:
    H2 title text>>>>>>>>>>>>edit<<By clicking here the editor can access the text under H2 immediately.
    Lorem ipsum etc.

    H3 title text>>>>>>>>>>>>>edit<<By clicking here the editor can access the text under H3 immediately.
    Lorem ipsum etc.

    Last edited Jul 19, 2009 7:22 PM
    Report abusive comment

    excellent stuff

    thanks for writing excellent stuff. the method described by you is very helpful for document structure.

    Last edited Mar 14, 2009 11:37 AM
    Report abusive comment

    inconsistent use of "H1" vs. "h1"

    observation: a premise of basic writing, and a requirement for effective technical writing (especially for IT professionals) is to adopt a standard for capitalization and stick to it...

    Last edited Aug 20, 2008 6:28 PM
    Report abusive comment

    not very helpful...

    not very helpful...

    missing: could you provide a step-by-step workflow, complete with screen shots of "before and after" ...

    missing: you should provide best practices for wording of section headers, such as the tight spacing in the TOC will mean verbose titles are counterproductive...

    missing: a hint of what would be too many sections... 10? 20? 100?

    confusing: please decide upon usage of H1 headers... ther are several opinions which convey differing messages to the reader...

    Last edited Aug 20, 2008 6:46 PM
    Report abusive comment

    Good visual, not much explanation

    I clicked to here from the Help. The Help article was more useful for the lay person (the non-HTML techie), imo. Perhaps joining the two article together would be more valuable (and save some time searching the Help)?

    Last edited Aug 2, 2008 10:34 AM
    Report abusive comment
    Knol Help
    Knol Help
    Helping authors since 2008 at Google
    Mountain View, CA
    Article rating:
    Your rating:

    Categories

    Based on community consensus.

    Activity for this knol

    This week:

    253pageviews

    Totals:

    10098pageviews
    19comments