Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 132259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:14:04+00:00 2026-05-11T06:14:04+00:00

Is there a way (ideally easy) to make headings and sections autonumber in HTML/CSS?

  • 0

Is there a way (ideally easy) to make headings and sections autonumber in HTML/CSS? Perhaps a JS library?

Or is this something that is hard to do in HTML?

I’m looking at an application for a corporate wiki but we want to be able to use heading numbers like we always have in word processors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:14:04+00:00Added an answer on May 11, 2026 at 6:14 am

    2016 update. Please see Stephen’s answer below for a proper method in CSS. My answer made sense in 2009 when the browsers and libraries were different. We are now living in a whole new world and the method presented here is outdated. I’m leaving it for the poor souls that are still living in corporate microcosms made of IE7 and tears.


    See this other question if you’re wondering how to do it in CSS, the answer might be what you are looking for. But titel has a good proposition too, depending how your HTML document is made.

    It should be noted that, as Triptych said in another comment, this is of interest only if it’s for an internal tool where you have control over which browsers are used and using CSS is worth it because modifying the HTML would be hard for example. Support of this CSS feature is limited.

    It would of course be easy to use something like jQuery to do the increment also. Something like this untested snippet:

    $(document).ready(function() {   $('h1').each(function(index) {     $(this).html((index + 1) + '. ' + $(this).html());   }); }); 

    Don’t forget to include the jquery.js file in your document of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to grab a users LinkedIn profile photo? Ideally similar
Is there an way, ideally backwards compatible to Mac OS X 10.3, to tell
Is there a way to migrate SourceSafe with HISTORY into a SVN ? Ideally
I am wondering if there is an easy way, ie like a simple cron
Is there an easy way for a grails application to find the available list
Is there an easy way in Jenkins to list all all builds marked as
Is there an easy way to have the form helpers set the tabindex parameter
Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server
Is there an easy way for me to automatically search recursively through a directory
Is there any easy/quick way to yank into vim's last search register (/)? From

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.