Reputation: 87
I would like to use text-decoration
to underline a word in a heading but I can't figure out how to do it in CSS. Is it even possible?
I thought about using <span>
but is there a way to use multiple spans and address them separately in CSS?
Upvotes: 1
Views: 2410
Reputation:
Since you want to do it using CSS, you can assign an id to the span element. Then use CSS to style it
<span id="under">Hello</span>
And the CSS
#under{
text-decoration : underline;
}
And if you want to underline multiple spans, you can use class attribute.
<span class="under"> </span>
.under{
text-decoration : underline;
}
Upvotes: 3