To expand on Javaboey's answer so you may be able to understand a bit better, if the text in question is a paragraph, in your stylesheet you would just add some style to paragraphs with a certain class (the colour needs to be amended to the hex colour you need)
Code:
p.white-underline {
border-bottom: 1px solid #FFFFFF;
}
In your HTML:
HTML Code:
<p class="white-underline">I am a line of text</p>
However, if you want to just add a border to a word (or several words) in a paragraph of text then you would set up a class
Code:
.white-underline {
border-bottom: 1px solid #FFFFFF;
}
And then in your HTML wrap a span around each word you want to have the border applied to:
HTML Code:
<p>I am a <span class="white-underline">line</span> of <span class="white-underline">text</span></p>
Also, with using just a class you can apply it to any element in your HTML, so maybe you have an un-ordered list and you want one of the list items to be underlined:
HTML Code:
<ul>
<li>Item 1</li>
<li class="white-underline">Item 2</li>
<li>Item 3</li>
</ul>
I hope this helps clarify things for you.
Bookmarks