What does the HTML viewer show me?
A read-only DOM tree of your markup. Each element appears on its own line with its tag name, all attributes inline (id, class, src, data-*, etc.), and indent reflecting nesting depth. Text nodes appear as #text "first 60 chars…". Comments are rendered as <!-- … -->. The view is read-only — no edits — making it ideal for inspection without risk of accidental change.
How is this different from the HTML Editor?
The viewer is read-only — paste once, browse the tree, no editing. The Editor is read/write — paste, edit in place with formatting, copy back out. Use the viewer when you only need to inspect structure (e.g. "where does this class live in the tree?"); use the editor when you intend to modify the markup.
Why is this not just the browser DevTools Elements panel?
DevTools shows the DOM of the currently loaded page. This viewer shows the DOM of any markup you paste, without loading it as a page. That matters when (a) you only have a fragment, (b) the markup contains untrusted scripts you do not want executed, or (c) you want to inspect structure without leaving your current tab.
How does it handle malformed HTML?
The viewer uses the browser's built-in DOMParser, which applies the same error-recovery rules as a real browser. Unclosed tags are usually closed at parent boundaries; mis-nested tags are reordered. The output reflects what a browser would render, not the literal markup. Use the HTML Validator if you want to surface the underlying errors.
Are attributes shown in the order I wrote them?
Yes. DOMParser preserves attribute order on each element, and the viewer iterates over element.attributes in that order. So id, class, data-* attributes appear in the same order you wrote them.
Does it execute scripts in the pasted HTML?
No. DOMParser parses HTML to a Document object but does not execute scripts or load external resources. <script> tags appear in the tree as nodes — their content is treated as text. Pasting markup with potentially malicious JavaScript is safe.
Can I paste a fragment, or do I need a full document?
Both work. DOMParser will wrap fragments in synthetic <html>, <head>, and <body> elements — those wrappers will appear in the tree. If you want to see only your fragment, paste it inside <html>...</html> or strip the wrappers visually after viewing.
Is the HTML uploaded?
No. Parsing and tree rendering run entirely in your browser using DOMParser. Any markup containing internal layouts, hidden form values, or proprietary data structures never leaves your device.