CSSライブデモ:text-decoration デモボタンをクリックしてみてください!
selector {
    text-decoration: <'text-decoration-line'> || <'text-decoration-color'> || <'text-decoration-style'> || <'text-decoration-thickness'>;
    /*  
        この値は、
        text-decoration-line、
        text-decoration-color、
        text-decoration-style、
        text-decoration-thicknessプロパティの値を指定します。
        プロパティ値の指定順序に決まりはありません。
        省略されたプロパティには初期値が適用されます。
    */
}
/* キーワード値 */
text-decoration: underline;
text-decoration: overline blue;
text-decoration: none;

/* グローバル値 */
text-decoration: inherit;
text-decoration: initial;
text-decoration: unset;
text-decoration: revert;
text-decoration: revert-layer;
<p>テキストデコレーションです。</p>
p {
    text-decoration: underline red;
}
/*
    省略されたtext-decoration-styleは初期値のsolidが指定されます
    省略されたtext-decoration-thicknessは初期値のautoが指定されます
*/
実際の適用例
<p>テキストデコレーションです。</p>
p {
    text-decoration: underline red 5px;
}
/*
    省略されたtext-decoration-styleは初期値のsolidが指定されます
*/
p {
    text-decoration: underline red;
    text-decoration-thickness: 5px;
}
/*
    省略されたtext-decoration-styleは初期値のsolidが指定されます
*/
実際の適用例
<p>テキストデコレーションです。</p>
p {
    text-decoration: red;
}
/*
    省略されたtext-decoration-lineは初期値のnoneが指定されます(重要)
    省略されたtext-decoration-styleは初期値のsolidが指定されます
    省略されたtext-decoration-thicknessは初期値のautoが指定されます
*/
実際の適用例

最終更新日: 2025-07-18

caniuse.comで詳しい情報をご確認ください。