diff --git a/src/formatters/html.py b/src/formatters/html.py
index 5557d20..9c21c73 100644
--- a/src/formatters/html.py
+++ b/src/formatters/html.py
@@ -27,7 +27,7 @@ def _format(self, text:str, indents:int):
doc_root = html.fromstring(text)
etree.indent(doc_root, space=indent_str)
- return etree.tostring(doc_root, encoding='unicode', pretty_print=True)
+ return etree.tostring(doc_root, method='html', encoding='unicode', pretty_print=True)
def is_correct(self, text:str) -> bool:
if isinstance(text, str):