text decoration html code example

Example 1: text-decoration css

h1 {
  text-decoration: overline;
}

h2 {
  text-decoration: line-through;
}

h3 {
  text-decoration: underline;
}

h4 {
  text-decoration: underline overline;
}

Example 2: html text decoration

<p style="text-decoration: none;"> There will be no effects. Default value </p>
<p style="text-decoration: underline;"> Text will be underlined </p>
<p style="text-decoration: overline;"> A line will be drawn over the text </p>
<p style="text-decoration: line-through;"> Text will be strikethrough </p>

Example 3: css underline

text-decoration: underline;

Example 4: line through in css

x {
  text-decoration: line-through;
}

Example 5: css text strike

h2 {
  text-decoration: line-through;
}

Example 6: how to underline font in css

h3 {
  text-decoration: underline;
}

Tags: