A table of contents is easy to generate in word processing tools, but trickier to pull off in plain HTML and CSS. But I have an approach that works.
css-tricks.com