About This HTML Issue
XML 1.0 doesn't allow a comment to end with a hyphen, and in HTML pages this usually comes from PHP code that never ran or from a comment typed with single hyphens, such as <!- note ->.
When the HTML parser meets <?, or <! without -- or DOCTYPE after it, or </ followed by something other than a letter, it reads everything up to the next > as a "bogus comment". If the character right before that > is a hyphen, the comment text ends with -. Browsers don't mind, but an XML 1.0 comment can't end that way, so the validator flags it. Look for an error at the same spot, such as Bogus comment. or one about XML processing instructions. Fixing that error clears this warning too.
PHP that reaches the browser without being run is a typical source, because its -> operator puts a - right before a >. If the server sends <?php echo $page->title; ?> as is, the bogus comment starts at <? and stops inside ->. The rest of the code, title; ?>, shows up on the page as plain text. Check that the server runs the file through PHP (usually it needs a .php extension) and that PHP is enabled for that directory. If the code is meant to be shown on the page, as in a tutorial, escape the < as <.
The other usual source is a comment typed as <!- note -> with single hyphens. HTML comments open with <!-- and close with -->.
Invalid example
<!- Main navigation ->
<nav>
<a href="/">Home</a>
</nav>
<h1><?php echo $page->title; ?></h1>
Valid example
<!-- Main navigation -->
<nav>
<a href="/">Home</a>
</nav>
<h1>About us</h1>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.