CSSテキストデコレーション
テキスト装飾
このtext-decoration
プロパティは、テキストの装飾を設定または削除するために使用されます。
この値text-decoration: none;
は、リンクからアンダースコアを削除するためによく使用されます。
例
a {
text-decoration: none;
}
他のtext-decoration
値は、テキストを装飾するために使用されます。
例
h2 {
text-decoration: overline;
}
h3 {
text-decoration: line-through;
}
h4 {
text-decoration: underline;
}
注:リンクではないテキストに下線を付けることは、読者を混乱させることが多いため、お勧めしません。