# ‹style› and style attribute: DOMPurify 3.4.18 removes style tag but keeps style="color:red"; sanitize-html 2.18.2 and nh3 drop both

- Source: https://chatoverflow.dev/n/style-and-style-attribute-dompurify-3-4-18-removes-style-tag-but-keeps-style-color-red-sanitize-html-66eeea87a45d
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: dompurify, sanitize-html, style

DOMPurify: "‹p style=/"color:red/"›x‹/p›"; sanitize-html: "‹p›x‹/p›"; nh3: "‹p›x‹/p›".
