HTML Table of Contents Generator

The HTML Table of Contents Generator is a practical tool designed to optimize the organization of your HTML pages. This tool specifically focuses on H2 and H3 headings in your code, creating a navigation menu for improved content structure that you can copy and paste into your page source code. Making your webpage stunning and easy to navigate has never been easier!

Table of Contents Preview

Table of Contents

 

Style settings:











 

TOC HTML Code

Headers with anchors HTML Code

How It Works

  1. Enter Your HTML Code:

    • Begin by pasting or typing your HTML code into the provided textarea under the "Enter your page HTML code here..." placeholder.
  2. Generate Table of Contents:

    • Click the "Generate Table of Contents" button to analyze your HTML code and automatically create a Table of Contents based on your headings.
  3. Customize Your Table of Contents:

    • Adjust the appearance of your Table of Contents using the settings on the right side of the page. You can modify the border style, width, color, background color, padding, margin, and list styles.
  4. Preview and Copy:

    • Once you're satisfied with your settings, click the "Apply Settings" button to see a preview of your styled Table of Contents.
    • Copy the generated Table of Contents HTML code using the "Copy to Clipboard" button.
  5. Headers with Anchors:

    • Additionally, you can view and copy HTML code for headers with anchors. Use this code to replace headers in your original HTML document.

Settings Panel Overview

The HTML table below presents the adjustable features within the settings panel, allowing users to precisely customize the appearance of the generated Table of Contents (TOC) to align with the design of their webpage.

Setting Description
Title Style Choose where the TOC title appears: either "Inside the article (default)" or as a separate "Table of Contents" above the TOC.
Border Style Define the style of the border surrounding the TOC. Options include "Solid," "Dotted," and "Dashed."
Border Width (px) Set the width of the border surrounding the TOC in pixels.
Border Color Select the color of the border around the TOC using a color picker.
Background Color Choose the background color of the TOC using a color picker.
Padding Left/Right (px) Adjust the left and right padding inside the TOC in pixels.
Padding Top/Bottom (px) Set the top and bottom padding inside the TOC in pixels.
Margin Left/Right (px) Specify the left and right margin outside the TOC in pixels.
Margin Top/Bottom (px) Determine the top and bottom margin outside the TOC in pixels.
H2 List Style Define the list style for H2 headings in the TOC. Options include "Disc," "Circle," "Decimal," "Square," or "None."
H3 List Style Choose the list style for H3 headings in the TOC, similar to the options for H2.
H3 List Indent (px) Adjust the indentation of H3 list items in pixels.
H3 List Font Size (px) Set the font size for H3 list items in pixels.

FAQ

What HTML tags are supported by the generator?

The generator supports H2 and H3 tags to structure and create a table of contents for your content.

Can I customize the appearance of the table of contents?

Absolutely! You can tailor the look of your table of contents by adjusting settings such as colors, border styles, padding, and more.

Are there any specific requirements for my HTML code?

The only requirement is that your HTML code includes H2 and H3 headings for the generator to analyze and create the table of contents.

Can I use this tool for multiple pages or documents?

Currently, the tool is designed to generate tables of contents for individual HTML pages.

How do I integrate the generated table of contents into my HTML page?

After generating the table of contents, you can easily copy the provided HTML code and integrate it into your existing HTML page.