How to Add a Dotted Underline Beneath HTML Text

The Solution to How to Add a Dotted Underline Beneath HTML Text is


It's impossible without CSS. In fact, the <u> tag is simply adding text-decoration:underline to the text with the browser's built-in CSS.

Here's what you can do:

<html>
<head>
<!-- Other head stuff here, like title or meta -->

<style type="text/css">
u {    
    border-bottom: 1px dotted #000;
    text-decoration: none;
}
</style>
</head>
<!-- Body, content here -->
</html>

~ Answered on 2013-03-06 16:24:46


Most Viewed Questions: