Why is the Table of Contents an ID in HTML?

Just curious of the decision behind it? Why not a class?

<nav id="TableOfContents">

Because on a single page, but design there shall be only one Table Of Contents, hence ID, which needs to be unique makes sense, as it will not be repeated like classes can be.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.