A Bash script that extracts and automatically indents the tag structure (the DOM skeleton) from an HTML file, deliberately ignoring the text content.
It is the perfect tool for quickly analyzing the structure of a webpage, checking the depth of nested elements, or stripping away filler text to reveal the bare HTML architecture.
- Input:
<html><body><h1>Title</h1><p>Hello</p></body></html>- Output
<html>
<body>
<h1>Title
</h1>
<p>Hello
</p>
</body>
</html>