How do you underline a word in CSS
I can add the underline to a span after text, but that doesn't work.} be aware that, while these selectors will work with the limited code that you provided, they will style all spans that are children of paragraphs.Explanation to the above syntax:You may have difficulty when trying to increase the gap between a text and its underlining.Auto| under| left| right| above.
Here, the value auto chooses a positioning for the underline and using the value under makes sure that the line is not.Let's see how to underline some selected words by using the following example.Here's jquery to do that to h1 elements.