Hi I’m Michael Tran: web technologist, athletic (cyclist, soccer), musical (mostly badly), foodie, parent of one dependent furkid.  Day job at the Department of The Treasury, night job jumping between rooftops as an expert web ninja. Views my own unless noted.

LinkedIn Strava @mikey_au



Another benefit to structure your web pages

Structuring your pages and providing a table of contents:

  • Assists screen readers as it enables them to navigate the document using headings
  • Provides a good overview of the material that awaits the reader
  • Adds a professional elegance and shows that you do care about content – after all content is king right?

After a couple of Google searches, I noticed links underneath the results that go directly to headings within the page.  This is pretty neat as it sends you direct to a block of content that may be more applicable to your search terms, rather than to the start of the document.

It turns out that Google has been doing this for over two years now.  Google doesn’t have a name for them so I’ll be calling them jump to links.  Google requires that the web page be setup in a compatible way before jump to links are added to search results.  To check out their requirements, see using named anchors to identify sections on your pages over at the Google Webmaster Central blog.

Existing Table of Contents Plus plugin users need not do any further work as the plugin meets all requirements.  Your headings should be included as jump to links within search results.  As an example, I searched for table of contents plus description and obtained the following search result:

Not only did it include a link directly to the ‘description’ section, it also included links to other sections of content on the page (as displayed in the table of contents).  Pretty neat huh!

So if you’re not already benefiting from this, start structuring your documents properly (eg using headings 1 through to 6), add the table of contents plus, sit back and relax.

You can find more information about the plugin in its WordPress repository page, or its homepage.


Table of Contents Plus 1108.1 released

The 1108 release introduced the use of heading content to create anchor targets rather than a predefined piece of text.  This was fine for English or other sites that uses ASCII characters.  1108.1 is a maintenance release which mostly addresses character sets for international sites.  Here are the changes:

  1. Anchor targets (eg anything after #) are now limited to ASCII characters as some mobile user agents do not accept internationalised characters.  This is also a recommendation in the HTML spec.  A new advanced admin option has been added to specify the default prefix when no characters qualify.
  2. Make TOC, Pages and Category labels compatible with UTF-8 characters.
  3. Support ‘ ” characters in labels as it was being escaped by WordPress before saving.

Still to come:

  • Back to top links
  • Better customisation of colours
  • Hide/show TOC link