Spelling and grammar text decorationsBaseline · Newly available
The text-decoration-line: spelling-error and text-decoration-line: grammar-error CSS declarations apply the browser's marking for spelling and grammatical mistakes. This is typically a wavy underline in red or green.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Dec 12, 2025.
Browser support
DesktopChrome
1–120Not supported
121+Supportedsince Jan 23, 2024
Current: 155Edge
12–120Not supported
121+Supportedsince Jan 25, 2024
Current: 154Firefox
1–136Not supported
137+Supportedsince Apr 1, 2025
Current: 157Safari
1–26.1Not supported
26.2+Supportedsince Dec 12, 2025
Current: 27MobileChrome Android
18–120Not supported
121+Supportedsince Jan 23, 2024
Current: 155Firefox Android
4–136Not supported
137+Supportedsince Apr 1, 2025
Current: 157Safari iOS
1–26.1Not supported
26.2+Supportedsince Dec 12, 2025
Current: 27How to use
Every current browser supports this, but it only became Baseline on Dec 12, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
CSS · check before using
@supports (text-decoration-line: grammar-error) {
/* styles that rely on text-decoration-line: grammar-error */
}
/* or in JavaScript */
if (CSS.supports("text-decoration-line", "grammar-error")) {
// use it
}Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| text-decoration-line.grammar-error | 121 | 121 | 137 | 26.2 | 121 | 137 | 26.2 |
| text-decoration-line.spelling-error | 121 | 121 | 137 | 26.2 | 121 | 137 | 26.2 |