Table des matières ne fonctionne pas lorsque les en-têtes sont dans une div ?

Does the table of contents not work when headers are inside a div? I am trying to make a table of contents with the headers centered but it seems impossible to do.

1 « J'aime »

I think this was mentioned previously, if I understand it right:

5 « J'aime »

So as far as I can tell basically there is no solution.

3 « J'aime »

It depends on what you try to achieve with your other HTML content.

I crosspost a potential workaround: TOC doesn't work when wrapped with HTML tags - #2 by Canapin

2 « J'aime »