||This article needs additional citations for verification. (August 2012)
HTML Tidy is a computer program and a library whose purpose is to fix invalid HTML and to improve the layout and indent style of the resulting markup.
It was developed by Dave Raggett of World Wide Web Consortium (W3C), then transferred to a SourceForge project. Its source code is written in ANSI C for maximum portability and precompiled binaries are available for a variety of platforms. It is available under the W3C license (a permissive, BSD-style license). New versions are available only as source code, checked out under CVS (Concurrent Versions System, a version control system), not binary.
Examples of fixes it can make to bad HTML:
- Straighten mixed-up tags
- Fix missing or mismatched end tags
- Add missing items (some tags, quotes, ...)
- Report proprietary HTML extensions
- Change layout of markup to predefined style
- Transform characters from some encodings into HTML entities