To load HTML without doctype, html, body elements use `LIBXML_HTML_NOIMPLIED` flag.
<?php
$html = <<<EOT
<div class="row">
<div class="col"><h1 id="heading" class="col1-heading">Hello</h1></div>
<div class="col"><p class="paragraph">Hello world.</p>
</div>
EOT;
$doc = \DOM\HTMLDocument::createFromString($html, LIBXML_HTML_NOIMPLIED);
echo htmlspecialchars($doc->saveHTML(), ENT_QUOTES);
?>