CSS 데모: text-decoration 데모 버튼을 클릭해 보세요!
selector {
    text-decoration: <'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'>
    /*  
        이 값은
        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로 지정됨
*/
실제 적용 모습

마지막 업데이트 정보: 2024-06-12

text-decoration속성에 대한 브라우저 호환성
속성
데스크탑 Chrome
Chrome
데스크탑데스크탑 Edge
Edge
데스크탑 Firefox
Firefox
Safari
Safari
text-decoration 1 12 1 1
단축 표현 57 79 6 8
text-decoration-thickness 값이 포함된 단축 표현 87 87 70 지원하지 않음

caniuse.com에서 더 자세한 정보를 확인해 보세요.