diff --git a/doc/python/interactive-html-export.md b/doc/python/interactive-html-export.md
index 683537c4720..38ace38f175 100644
--- a/doc/python/interactive-html-export.md
+++ b/doc/python/interactive-html-export.md
@@ -72,7 +72,7 @@ You can insert Plotly output and text related to your data into HTML templates u
Then use the following Python to replace `{{ fig }}` in the template with HTML that will display the Plotly figure "fig":
-```
+```python
import plotly.express as px
from jinja2 import Template