1.0.1 • Published 9 years ago

heading-outline v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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