<U> Underline tag in HTML

WE can add underline to any part of the text by using <u> tag. Here is some sample code.
This is normal text and this part of the text is underlined , this is normal.
The above text is written like this.
This is normal text and <u>this part of the text is underlined</u> , this is normal
Please note that as a practice hyperlinks are underlined so by just adding underline we have to take care to differentiate from a link.

<u> tag is going to be deprecated so avoid using them. It is advisable to use CSS for underline text.

Using CSS

<style>
my_text {
   text-decoration: underline; 
}
</style>

<p> Plus2net.com is a site for <my_text>web programming</my_text> and learning SEO</p>
Using Inline Style
<p> Plus2net.com is a site for <span style="text-decoration: underline;">web programming</span> and learning SEO</p>
Output is here

Plus2net.com is a site for web programming and learning SEO

Using inline style with Uunderline tag

<style>
u { 
 font-size: 40px;
 color:red;
}
</style>

Subscribe to our mailing list

* indicates required
Subscribe to plus2net
Your Rating


Google+

Post Comment This is for short comments only. Use the forum for more discussions.




Subscribe to our mailing list

* indicates required
Subscribe to plus2net
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2017 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer