Check out example codes for "css underline". It will help you in understanding the concepts better.

Code Example 1

h1 {
  text-decoration: overline;
}

h2 {
  text-decoration: line-through;
}

h3 {
  text-decoration: underline;
}

h4 {
  text-decoration: underline overline;
}

Code Example 2

a:hover {
  text-decoration: underline;
}

Code Example 3

h3 {
  text-decoration: underline;
}

Code Example 4

/* Using 'text-decoration' property with 'underline' value. we can draw underline below the text using css */
<style>
p {
  text-decoration: underline;
}
</style>
<p>Hello all Welcome here !!!</p>

Code Example 5

h3 {
  text-decoration: underline;
}

Code Example 6

text-decoration: underline;

Learn ReactJs, React Native from akashmittal.com