I was writing up a signpost support question on our site meta. That post included a link which would need to be updated to another such question once asked. I therefore wanted to include an HTML comment:

<!--- An HTML comment ---!>

Except that including it broke the formatting from that point on:

Here, after the comment, *formatting* does not work. [Links][1] formatting don't work, And even paragraphs can't be made with double line-breaks. The comment itself behaves correctly, which is to say that it isn't rendered. You'll sort of have to see the source code to see exactly what is happening, and do take the above comment out and see what happens (i.e. that the formatting fixes itself). [1]: http://www.example.com "example link"
  • 5
    It's because of your trailing exclamation mark (which isn't needed for a HTML comment). It still shouldn't be breaking the parser though. Commented Jul 26, 2020 at 21:28
  • 4
    <!-- this is a comment --> while <!--- this is not ---!>
    – VLAZ
    Commented Jul 26, 2020 at 21:29
  • 2
    Why is this status-by-design @animuson? I'd have expected the parser to either not recognise the bad close of the comment and wipe out the rest of the answer or recognise it and honour formatting. It's a bit unexpected to recognise that the comment completed and then stop formatting the post. Commented Jul 26, 2020 at 21:54
  • meta.stackexchange.com/a/351326/179419 @Ollie. Commented Jul 26, 2020 at 22:00
  • @benisuǝqbackwards see the comment of animuson on the answer below why it is status-by-design
    – Luuklag
    Commented Jul 27, 2020 at 6:57

1 Answer 1


The way you wrote your comment is incorrect. It's like this:

<!-- My Little Comment -->

Just take away the exclamation mark at the end.

  • 2
    Hmm... yeah, that was pointed out in the comments. But I guess that makes the bug report: "Incorrect html-comment formatting breaks formatting from that point, but not the comment" Commented Jul 26, 2020 at 21:33
  • Yes, it does not break at that point (you can test with the preview when editing the question) Commented Jul 26, 2020 at 21:38
  • 13
    @Someone_Evil We don't support oddities that arise from using invalid formatting or HTML that causes other things to break - that behavior is inherently undefined. It works correctly when using correct syntax.
    – animuson StaffMod
    Commented Jul 26, 2020 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .