Here's a simple block:

This should be a code block, though:

<div>
    foo
</div>

As should this:

<div>foo</div>

Now, nested:

This should just be an HTML comment:

Multiline:

Code block:

<!-- Comment -->

Just plain comment, with trailing spaces on the line:

Code:

<hr />

Hr's: