Skip to content

no-raw-gt

Reports a > in text (a > b). A raw < in text is a syntax error.

A > is valid HTML and renders as written. Some tools and templates still treat a lone > as the end of a tag, so escaping it avoids surprises.

To fix, write &gt;.

Reported
<!doctype html>
<title>t</title>
<p><strong>></strong></p>
<p>a &gt; b &amp; &#38;</p>
...
<p>one
two > three</p>
<script>if (a > b) {}</script>
<style>a > b {}</style>
angular:
lint:
rules:
no-raw-gt: warn # off (default), warn, error
html:
lint:
rules:
no-raw-gt: warn # off (default), warn, error
svelte:
lint:
rules:
no-raw-gt: warn # off (default), warn, error
vue:
lint:
rules:
no-raw-gt: warn # off (default), warn, error

Enabled by the presets: html/htmlhint.

Suppress one line with sudsy-disable-next-line no-raw-gt in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
htmlhint spec-char-escape partial a raw < in text is the parser’s error, a > the rule no-raw-gt