Variations in Pre Tags counts how many keyword variations appear inside a page’s preformatted (pre) text — the block reserved for code and other whitespace-sensitive content. It returns a whole-word occurrence count, and a score of zero is normal for pages that carry no code or formatted examples.
| Factor ID | RG-KWD-075 |
|---|---|
| Family | Keyword Usage & Density |
| Measurement | Variation occurrence count |
| Measured zone | Cleaned pre contents |
What it measures
This factor counts keyword variations inside preformatted text elements. The pre tag holds content whose whitespace must be preserved — code listings, terminal output, and formatted examples — so this signal reflects how often your tracked term and its variants surface in that technical zone rather than in ordinary body copy.
How RankGear measures it
RankGear extracts the recognized pre contents from the page, cleans the captured HTML, and totals case-insensitive whole-word variation matches. Matching is whole-word, so a variation only counts when it stands as its own token in the cleaned text, and casing is ignored.
What RankGear looks for
<pre>
install rankgear-cli
rankgear audit --keyword "keyword"
</pre>| If the page is… | Do this |
|---|---|
| A code, tutorial, or reference page with relevant examples | Expect a non-zero count; keep the pre content accurate and technically relevant. |
| Not a code or reference page | A count of zero is expected — don’t add pre blocks just to move this number. |
How to optimize it
Use pre for content whose whitespace genuinely must be preserved, such as code or formatted examples, and keep that content technically relevant to the page’s topic. Treat this factor as an observation about how your page uses preformatted text, not a target to inflate — forcing prose or padded keywords into pre blocks works against the element’s purpose.
Important considerations
- Ordinary prose should not be placed in
prefor this factor. - Whitespace preservation does not change the whole-word matching intent.
- The factor does not assess whether the code itself is correct.
- Many pages legitimately score zero, and that is not a defect.
- This is a prioritization signal that tracks with position within a measured result set — it does not, on its own, cause or guarantee a ranking.
Related factors
Part of the Factors reference · how RankGear measures · glossary.