Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Page</title>
</head>
<body>
<!-- Main content -->
<div class="container">
<h1>Hello World</h1>
<p class="text">This is a paragraph with some <strong>bold</strong> text.</p>
</div>
</body>
</html>
After (Medium):
<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><meta name=viewport content="width=device-width, initial-scale=1.0"><title>My Page</title></head><body><div class=container><h1>Hello World</h1><p class=text>This is a paragraph with some <strong>bold</strong> text.</div></body></html>
After (Advanced):
<!DOCTYPE html><html lang=en><head><meta charset=UTF-8><meta name=viewport content="width=device-width, initial-scale=1.0"><title>My Page</title></head><body><div class=container><h1>Hello World</h1><p class=text>This is a paragraph with some <strong>bold</strong> text.</div></body></html>
Medium strips HTML comments, removes quotes from safe attribute values, collapses whitespace, and joins adjacent tags into a single line. Advanced goes further by removing XML declarations, CDATA sections, and default type attributes while minifying inline CSS within style attributes. The example shows a simple page but the tool handles complex multi-page HTML with nested elements, forms, tables, and embedded scripts.