HTML checker for obsolete and proprietary elements and attributes
66
stars
215
commits
JavaScript
primary language
Sep 3, 2026
updated
ObsoHTML is a Node.js tool designed to scan HTML, PHP, Nunjucks, Twig, JavaScript, and TypeScript files for obsolete and proprietary HTML elements and attributes. It helps you identify and update deprecated HTML code to be sure to use web standards.
ObsoHTML has inherent limitations and may not find all obsolete elements and attributes. If you run into a problem, please file an issue.
Consider using ObsoHTML via npx:
npx obsohtml
ObsoHTML accepts a folder or file path as an argument. The path can be either absolute or relative; when it’s omitted, ObsoHTML checks the current directory.
ObsoHTML can be run in “verbose” mode by appending -v or --verbose to the command. This will show information about files and directories that were skipped.
Check the current directory:
npx obsohtml
Specify a folder using an absolute path:
npx obsohtml /path/to/folder
Specify a folder using a relative path:
npx obsohtml ../path/to/folder
Specify a single file:
npx obsohtml src/index.html
Install ObsoHTML in your project, e.g., via npm i -D obsohtml, then import and use what you need:
import { checkMarkup, obsoleteElements, obsoleteAttributes } from 'obsohtml';
const { elements, attributes } = checkMarkup('<center>Hello</center>');
// elements: ['center']
// attributes: []
checkMarkup(html)Checks an HTML string for obsolete and proprietary elements and attributes.
html (string)—the HTML content to check{ elements: string[], attributes: string[] }—arrays of found obsolete element and attribute namesobsoleteElementsArray of obsolete or proprietary HTML element names checked by ObsoHTML.
obsoleteAttributesArray of obsolete or proprietary HTML attribute names checked by ObsoHTML.
The script will output messages to the console indicating any obsolete elements or attributes found in the scanned files, along with the file paths where they were detected.
The script exits with code 1 if any obsolete HTML is found, and 0 if none is found, making it suitable for use in CI pipelines.
This started as an experiment, in which I used AI to produce this little HTML quality helper, its tests, and its documentation. While it’s pretty straightforward, I’m sure to have missed something. Please file an issue or contact me directly if you spot a problem or have a suggestion.
Thanks to @mattbrundage, @FabianBeiner, and @AndrewMac for helping to make ObsoHTML better!
You might like some of my other work:
JavaScript
94.8%
TypeScript
4.9%
HTML checker for obsolete and proprietary elements and attributes
66
stars
215
commits
JavaScript
primary language
Sep 3, 2026
updated
ObsoHTML is a Node.js tool designed to scan HTML, PHP, Nunjucks, Twig, JavaScript, and TypeScript files for obsolete and proprietary HTML elements and attributes. It helps you identify and update deprecated HTML code to be sure to use web standards.
ObsoHTML has inherent limitations and may not find all obsolete elements and attributes. If you run into a problem, please file an issue.
Consider using ObsoHTML via npx:
npx obsohtml
ObsoHTML accepts a folder or file path as an argument. The path can be either absolute or relative; when it’s omitted, ObsoHTML checks the current directory.
ObsoHTML can be run in “verbose” mode by appending -v or --verbose to the command. This will show information about files and directories that were skipped.
Check the current directory:
npx obsohtml
Specify a folder using an absolute path:
npx obsohtml /path/to/folder
Specify a folder using a relative path:
npx obsohtml ../path/to/folder
Specify a single file:
npx obsohtml src/index.html
Install ObsoHTML in your project, e.g., via npm i -D obsohtml, then import and use what you need:
import { checkMarkup, obsoleteElements, obsoleteAttributes } from 'obsohtml';
const { elements, attributes } = checkMarkup('<center>Hello</center>');
// elements: ['center']
// attributes: []
checkMarkup(html)Checks an HTML string for obsolete and proprietary elements and attributes.
html (string)—the HTML content to check{ elements: string[], attributes: string[] }—arrays of found obsolete element and attribute namesobsoleteElementsArray of obsolete or proprietary HTML element names checked by ObsoHTML.
obsoleteAttributesArray of obsolete or proprietary HTML attribute names checked by ObsoHTML.
The script will output messages to the console indicating any obsolete elements or attributes found in the scanned files, along with the file paths where they were detected.
The script exits with code 1 if any obsolete HTML is found, and 0 if none is found, making it suitable for use in CI pipelines.
This started as an experiment, in which I used AI to produce this little HTML quality helper, its tests, and its documentation. While it’s pretty straightforward, I’m sure to have missed something. Please file an issue or contact me directly if you spot a problem or have a suggestion.
Thanks to @mattbrundage, @FabianBeiner, and @AndrewMac for helping to make ObsoHTML better!
You might like some of my other work:
JavaScript
94.8%
TypeScript
4.9%