Search code examples
htmlvisual-studio-2008

Why is element <u> considered outdated according to VS2008?


Why do I get the following message in Visual Studio when I use the <u> element?

"Element 'u' is considered outdated. A newer construct is recommended"

Has it aged?


Solution

  • The underline tag has been deprecated as of HTML4. The W3C reference can be found here. The reason is that visual styling does not belong in tags, but should be moved to style-sheets.

    You can use the text-decoration: underline style instead:

    <span style="text-decoration: underline">some underlined text</span>
    

    To remove underline, use text-decoration:none to disable underlining.