node package manager


Annotate elements in HTML pages


Annotate elements in HTML pages

Install this grunt plugin next to your project's Gruntfile.js gruntfile with: npm install grunt-html-annotation

Then add this line to your project's Gruntfile.js gruntfile:


A very simple plugin that annotates HTML elements with their tag names e.g:

Before: <h1>A header</h1>

After: <h1>[h1] A header</h1>

In your grunt config section:


You don't need to add trailing forward slashes.

Run grunt html-annotation and the generated files will appear in the folder as denoted by the 'dest' config option.

  • Make annotation configurable.
  • Multi-task options.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

  • 0.1.0 - Initial plugin release.
  • 0.2.0 - Grunt 0.4 compatible.

Copyright (c) 2013 Ben Paddock
Licensed under the MIT license.