Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    heading-outlinepublic

    heading-outline

    NPM

    See the outline of your html document as semantically structured by your heading elements. This is useful to optimize your page for accessibility (a11y).

    This module is inspired by the same feature in the WAVE testing tool

    Usage

    If you pipe this

    <html>
      <head>
        <title></title>
      </head>
      <body>
        <h1>heading <span>1</span></h1>
        What is going on?
        <h2>heading 2</h2>
        <h3><strong>heading 3</strong></h3>
        <h2>heading 2b</h2>
        wat
      </body>
    </html>

    into it like this:

    cat index.html | heading-outline

    you would get an outline like this

    - heading 1
    -- heading 2
    --- heading 3
    -- heading 2b
    

    install

    npm i heading-outline

    Downloadsweekly downloads

    9

    version

    1.0.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar