Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 550 Bytes

File metadata and controls

24 lines (19 loc) · 550 Bytes

HTMLPrettyPrinter-Script

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.

Example

  • Input:
<html><body><h1>Title</h1><p>Hello</p></body></html>
  • Output
<html>
	<body>
		<h1>Title
		</h1>
		<p>Hello
		</p>
	</body>
	</html>