Skip to main content

HTML Guide

Bogus comment.

A bogus comment error occurs when an invalid or incorrectly formatted comment appears in HTML.

HTML comments must use the syntax <!-- comment text --> and cannot contain a double hyphen -- except at the start and end. Bogus comments often result from mistakes like using a single hyphen, omitting angle brackets, or including -- in the comment body.

Correct syntax:

<!-- This is a valid comment -->

Incorrect example (causes a bogus comment error):

<! -- This is not valid -->

Learn more: