Underline (<u>)

1
2Кб

To make text underlined in HTML, you can use the <u> element. This element simply indicates that the enclosed text should be visually underlined.

Example:

HTML
<p>This is <u>underlined text</u>.</p>

Note:

  • The <u> element is primarily used for presentation purposes. It doesn't convey any specific semantic meaning about the content.
  • While it's still supported, it's generally considered a legacy element. For modern web design, it's often recommended to use CSS styles to achieve underlining effects.

CSS Alternative:

You can achieve the same effect using CSS styles. For example:

CSS
.underlined-text {
  text-decoration: underline;
}

HTML
<p class="underlined-text">This is underlined text using CSS.</p>

This approach provides more flexibility and control over the appearance of the underlined text, allowing you to customize its color, thickness, and other properties.

In summary:

  • The <u> element is used to make text underlined.
  • It's primarily for presentation purposes.
  • For modern web design, consider using CSS styles for more control and flexibility.
Like
3
Поиск
Категории
Больше
Computer Programming
HTML, Head, Body tags
HTML The root element of an HTML document. Encloses the entire document, including the head...
От HTML PROGRAMMING LANGUAGE 2024-08-13 03:31:57 0 2Кб
Chemistry
NEW CURRICULUM CHEMISTRY PRACTICAL SAMPLES
https://acrobat.adobe.com/id/urn:aaid:sc:EU:4838a935-5393-417a-a9b9-a4c21d6109cb
От Landus Mumbere Expedito 2024-07-18 19:33:23 0 3Кб
Physics
QUANTUM PHYSICS
Quantum mechanics 
От PHYSICS FOR MASTER'S STUDENTS 2024-08-31 05:11:54 0 3Кб
Politics
Ugandan Opposition Leader Bobi Wine Shot by Police During Thanksgiving Event
In a shocking turn of events today, Ugandan opposition leader Bobi Wine was shot in the leg...
От Mpatswe Francis 2024-09-03 19:50:37 1 6Кб