Text decoration

HTML apply text decoration by adding .text-{decoration} class to text elements

HTML to control text decoration on hover apply text decoration by adding .hover:text-{decoration} class to text elements

  • Text decoration underline

  • Text decoration line-through

  • Text decoration none

  • Text decoration underline on hover

  • Text decoration line-through on hover

  • Text decoration none on hover

HTML
    <p class="text-underline">Text decoration underline</p>
<p class="text-line-through">Text decoration line-through</p>
<p class="text-no-underline">Text decoration none</p>

<p class="hover:text-underline">Text decoration underline on hover</p>
<p class="hover:text-line-through">Text decoration line-through on hover</p>
<p class="text-underline hover:text-no-underline">Text decoration none on hover</p>