`). Any element you don't want to be warned about can be whitelisted.
- **Validate Element Location**: Make sure that elements don't appear as children of parents they're not allowed to descend from. An example of this is a block element like `` appearing as the child of an inline elements like ``.
- **Validate Attributes**: Like validating elements, this rule will let you know if you're using attributes that don't belong on a particular element or perhaps don't belong on any element. If your project uses custom attributes (like `ng-*` in AngularJS) they can be whitelisted.
- **Duplicate IDs**: Warn if non-unique IDs are found on the same page.
- **Unique Elements**: Warn if elements that should be unique (like `` and ``) appear more than once in the document.
### Best Practices
Some markup may be perfectly valid but use practices that are commonly considered to be poor or outdated. The following rules check for these types of things. (Note that everything in this list is subjective and optional.)
- **Inline Event Handlers**: Warn if inline event handlers, like `onclick="return false"` are found in the document. Inline event handlers are hard to manage, hard to debug, and completely non-reusable.
- **Script Placement**: Warn if script elements appear anywhere other than right before the closing `` tag. Because JavaScript is blocking, adding `
```
## Running the Tests
If Grunt and all the dependencies are installed, you can run the tests with the following command.
```sh
grunt test
```
HTML Inspector has two test suites, one that runs in pure Node and one that uses [Mocha](http://visionmedia.github.io/mocha/) and [PhantomJS](http://phantomjs.org/) because it needs a browser.
If you want to run the browser tests in a real browser (instead of via PhantomJS) simply fire up a local server and load the `tests/html-inspector-test.html` file. Make sure to run `grunt test` beforehand as it builds the tests.
## Contributing
I'm always open to feedback and suggestions for how to make HTML Inspector better. All feedback from bug reports to API design is quite welcome.
If you're submitting a bug report, please search the issues to make sure there isn't one already filed.
If you're submitting a pull request please read [CONTRIBUTING.md](https://github.com/philipwalton/html-inspector/blob/master/CONTRIBUTING.md) before submitting.
## FAQs
The FAQs section has grown rather large, so it has been moved to its own page. You can find the [full FAQs here](https://github.com/philipwalton/html-inspector/blob/master/FAQs.md).
## Third Party Rules
- [Large Viewstate](https://github.com/palewar/html-inspector/blob/master/src/rules/best-practices/large-viewstate.js) - warn if View State takes up more than 50KB (configurable) in ASP.NET generated HTML
- [Voice Input](https://googledrive.com/host/0B8yu2s4Q9YD8VEZNUHJaV3BkSzA/File.htm) - warn when input fields are inaccessible to voice input