Number of HTML Comments

Number of HTML Comments counts the recognized <!-- ... --> comment blocks in a page’s body markup. It is a plain count, not a target — more or fewer comments is neither a ranking goal nor a penalty on its own.

Factor IDRG-SIZ-015
FamilySize & length
MeasurementCount
Measured zoneRendered, script-free page body

What it measures

This factor counts the recognized HTML comment blocks — the <!-- ... --> pairs — present in the body markup of the page. It reports how many complete comment blocks RankGear found, nothing about what those comments contain.

How RankGear measures it

RankGear applies a case-insensitive, multiline-compatible pattern to the rendered, script-free body and counts each complete HTML comment pair it matches. Comments that fall outside the body representation, or that are malformed and never close, may not be counted.

What RankGear looks for

<!--[\s\S]*?-->
If the page has…How to read it
A handful of intentional commentsNormal — template markers and maintenance notes are expected.
A high countWorth a look: often commented-out markup, stale debug notes, or build-tool output adding bytes with no visible content.
ZeroFine — nothing to act on; a clean count is not inherently better or worse.

How to optimize it

Treat this as an observation rather than a number to drive up or down. When you do review comments, remove obsolete debug notes, commented-out markup, sensitive information, and unnecessary template comments — and keep the comments that serve a genuine maintenance or tooling purpose. The aim is cleaner, safer source, not a particular count.

Important considerations

  • More or fewer comments are not direct SEO goals — this is a descriptive count, not a lever.
  • Source comments can expose implementation details to anyone who views the markup.
  • Comments add bytes to the response without contributing visible content.
  • Some build tools automatically insert comments, so a count can rise without any manual edit.
  • This factor relates to a page’s position within a measured result set; it is a prioritization signal, not a cause of ranking, and no comment count makes a page rank.

Related factors

Part of the Factors reference · how RankGear measures · glossary.