diff --git a/src/formatitko/html_generator.py b/src/formatitko/html_generator.py
index 2efc93e..a2ece6a 100644
--- a/src/formatitko/html_generator.py
+++ b/src/formatitko/html_generator.py
@@ -46,7 +46,8 @@ class HTMLGenerator(OutputGenerator):
def start_tag(self, tag: str, attributes: dict[str,str]={}) -> str:
words = [tag]
for key, value in attributes.items():
- words.append(f"{key}=\"{self.escape_special_chars(value)}\"")
+ if value is not None:
+ words.append(f"{key}=\"{self.escape_special_chars(value)}\"")
return "<" + " ".join(words) + ">"
def end_tag(self, tag: str, attributes: dict[str,str]={}) -> str: