---
title: "How to change the color of the table of contents"
slug: "how-to-change-the-color-of-the-table-of-contents"
description: "You would want to change the color of the table of contents to showcase it better. "
tags: ["Customization"]
updated: 2026-03-10T04:14:19Z
published: 2026-03-10T04:14:19Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.document360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to change the color of the table of contents

You would want to change the color of the table of contents to showcase it better. Follow the below steps to change the color of the table of contents.

### Solution

Knowledge base Site 1.0Knowledge base Site 2.0

1. Navigate to **Settings** (<nor class="fa-solid fa-gear" data-tomark-pass=""></nor>) > **Knowledge base site** > **Site customization** > **Custom CSS & JavaScript** in the Knowledge base portal.

![Site customization options including CSS, JavaScript, and theme settings for a knowledge base.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Custom%20css%20&amp;%20js.png)
2. Paste the below code snippet in the **Custom CSS** tab.

```css
.content_block .content_container .page-action .article_action_links ul li a
{
color: red !important;
}
```

1. In the above snippet, you can replace the color red with any other color of your choice.
2. Click **Save**.

1. Navigate to **Settings** (<nor class="fa-solid fa-gear" data-tomark-pass=""></nor>) > **Knowledge base site** > **Site customization** > **Custom CSS & JavaScript** in the Knowledge base portal.

![Site customization options including CSS, JavaScript, and theme settings for a knowledge base.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Custom%20css%20&amp;%20js.png)
2. Paste the below code snippet in the **Custom CSS** tab to change the color of the table of contents.

```css
d360-table-of-content .toc-item .toc-toggle-icon,
d360-table-of-content .toc-item a {
    color: red !important;
}
```

1. Paste the below code snippet in the **Custom CSS** tab to change the color of the selected heading in the table of contents.

```css
d360-table-of-content .toc-item.selected a {
    color: blue !important;
}
```

1. In the above snippets, you can replace the colors with any other color of your choice.
2. Click **Save**.

![CSS code snippet showing styling for table of contents with highlighted elements.](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/Change%20color%20of%20toc.png)

---

### Outcome

#### Before

The default color of the table of contents is grey****and the content actively open will be highlighted in blue color.

![2_Screenshot_Before_color_of_table_of_Content.png](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/2_Screenshot_Before_color_of_table_of_Content.png)

#### After

After updating the code snippet in **Custom CSS**, the color of the table of contents other than the actively open content will be changed to red.

![3_Screenshot_After_color_of_table_of_Content.png](https://cdn.document360.io/860f9f88-412e-4570-8222-d5bf2f4b7dd1/Images/Documentation/3_Screenshot_After_color_of_table_of_Content.png)
