How html tag extractor works
The extractor reads an HTML snippet and identifies every opening tag, its name, and its attributes. It uses a forgiving regex-based scan that handles quoted attribute values (single or double quotes) and boolean attributes, so it works on the kind of real-world HTML people paste, not just perfectly-formed markup.
For every opening tag it records the attributes and their decoded values, then aggregates the results: a per-tag count, every unique class and id, and the collected values for common attributes like href, src, alt, title, rel, and target. It also counts HTML comments and reports whether a doctype is present.
Closing tags are counted separately from opening tags so you can spot mismatches. All parsing happens in your browser, so the HTML you paste is never uploaded.
Frequently asked questions
Does this validate my HTML?
No, it extracts and counts, it does not validate. Mismatched or missing closing tags will show up as a difference between the open and closing tag counts, but the extractor does not enforce a correct nesting structure.
Why are attribute values decoded?
HTML attributes often contain entities like & or <. The extractor decodes the common named and numeric entities back to their characters so the displayed value matches what a browser would actually use.
What is the difference between class and class counts?
A class attribute can hold several space-separated classes, such as class="card highlight". The extractor splits these, lists every unique class, and shows how many times each class appears across all tags.
Can it handle broken or partial HTML?
It uses a forgiving scan that skips text and only reads tags it can recognize, so partial fragments still produce useful output. Malformed tags may simply be skipped.