MD033 - No Inline HTML
Inline HTML should be avoided.
Why This Rule Exists
Markdown documents should remain portable and renderable in environments that don't support HTML. Raw HTML also makes documents harder to maintain and can introduce security concerns in some contexts.
Examples
Incorrect
<div class="warning">
This is a warning message.
</div>
Click <a href="https://example.com">here</a> for more.
<br>
<img src="image.png" alt="An image">
Correct
> **Warning**: This is a warning message.
Click [here](https://example.com) for more.

Configuration
[MD033]
allowed_elements = [] # HTML elements to allow (default: none)
Allow Specific Elements
[MD033]
allowed_elements = ["br", "details", "summary"]
When to Disable
- Documents requiring HTML features not in Markdown
- Content using HTML for accessibility features
- mdBook projects using HTML preprocessors
Rule Details
- Rule ID: MD033
- Aliases: no-inline-html
- Category: Content
- Severity: Warning
- Auto-fix: No
Common Allowed Elements
| Element | Use Case |
|---|---|
br | Line breaks within paragraphs |
details | Collapsible sections |
summary | Summary for details |
kbd | Keyboard input |
sub, sup | Subscript/superscript |
Related Rules
- MD045 - Images should have alt text