How to create ascending-numbers (1,2,3...) CSS IDs and corresponding hrefs with JavaScript?

You can post code in your post by surrounding it with three backticks.

This linked post has further details about adding tags around your code.