Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Underline Element
Underline Element

Underline is a formatting element used to represent different text form other. It indicate that the text is misspelled or represents proper noun in Chinese language. It is used to define underlined text means it gives horizontal line below any text where it is applied.

Syntax

<u>Content</u>

Or

<tag><u>Content</u></tag>


You can apply underline element to any element and use any where within a HTML document.


Example

Underlined Text


Underline is a pair tag and output of underline element is horizontal line below text like you can see in above example.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Create any HTML element
  • Give text a horizontal line by using <u> element

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

heading 2 with underline element


Don't forget underline is non empty element which means it always comes in pair.