Obsohtml
HTML checker for obsolete and proprietary elements and attributes
Install / Use
/learn @j9t/ObsohtmlREADME
ObsoHTML, the Obsolete HTML Checker
ObsoHTML is a Node.js script 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.
Usage
1. As a Node Module
Installation
npm i obsohtml
(To install ObsoHTML globally, use the -g flag, as in npm i -g obsohtml.)
Execution
The script accepts a folder or file path as a command line option, which can be specified in both short form (-f) and long form (--folder). The path can be either absolute or relative.
The script 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.
Example Commands
Use the default directory (user home directory):
npx obsohtml
Specify a folder using an absolute path (easiest and most common use case):
npx obsohtml -f /path/to/folder
Specify a folder using a relative path:
npx obsohtml -f ../path/to/folder
2. As a Standalone Script
Installation
Download or fork the source repository.
Execution
As mentioned above, the script accepts a folder (-f, --folder) and can be run in “verbose” mode (-v, --verbose).
Example Commands
(All commands as run from the root directory of the downloaded repository.)
Use the default directory (user home directory):
node bin/obsohtml.js
Specify a folder using an absolute path (easiest and most common use case):
node bin/obsohtml.js -f /path/to/folder
Specify a folder using a relative path:
node bin/obsohtml.js -f ../path/to/folder
Output
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.
Background
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.
Acknowledgments
Thanks to @mattbrundage, @FabianBeiner, and @AndrewMac for helping to make ObsoHTML better!
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
