I am using HTML5, when I use <u></u> tag for underline, it says that it is unsupported by HTML5. What can I use in place of this for underlining?
You are looking for the text-decoration directive in CSS. As underlined text is a matter of styling and not of layout, it is better relegated to a stylesheet.
Which can be use as such, which will apply the style to all <td> elements on the page
td {
text-decoration: underline;
}
In CSS if you want a more targeted method of apply style, one way to go about this is with the class attribute of a tag <td class="className">. In CSS classes are defined with a leading full-stop.
.className {
/* relevant style */
}
so in the case of underlining you specific <td> tags. A method would be:
.underline {
text-decoration: underline;
}
<td class="underline">Here be underline</td><td>Here not be underline</td> ...
Further information on the form and ussage of CSS can he found at Css Basics
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With