diff --git a/packages/language-html/grammars/tree-sitter-html/indents.scm b/packages/language-html/grammars/tree-sitter-html/indents.scm
index b0478f15a..9c00eabb8 100644
--- a/packages/language-html/grammars/tree-sitter-html/indents.scm
+++ b/packages/language-html/grammars/tree-sitter-html/indents.scm
@@ -1,7 +1,7 @@
((start_tag) @indent
; Only indent if this isn't a self-closing tag.
- (#not-match? @indent "^<(?:area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)\\s"))
+ (#not-match? @indent "^<(?:area|base|br|col|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\\s|>)"))
; `end_tag` will still match when only ``, the dedent happens too soon.