Skip to main content
Inspiring
Jan 4, 2017 8:20 PM UTC
Answered

Continuous Text Underline

If I select a couple of works and then select Underline, it only underlines the individual letters. How can I have a continuous underline?

BTW I did a search but all the results were related to underlined links.
Thanks
Alan

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Jon Fritz
    Jon FritzCorrect answer
    Community Expert
    Jan 4, 2017 8:36 PM UTC

    Unless you're doing something exceptionally weird with your html, text-decoration:underline or the <u> tag will underline the entire word, or group of words, with a continuous line.

    You may be having a display driver issue if the underline is only showing on individual letters.

    How does it appear in each browser?

    5 replies

    Legend
    Jan 4, 2017 8:55 PM UTC

    English100 wrote:

    If I select a couple of works and then select Underline, it only underlines the individual letters. How can I have a continuous underline?

    BTW I did a search but all the results were related to underlined links.
    Thanks
    Alan

    Wrap the words in a <span></span> tag and then style it with css, example below:

    <!DOCTYPE html>

    <html>

    <head>

    <meta charset="UTF-8" />

    <title>Underlined Words</title>

    <style>

    .underline_text {

    padding: 0 0 2px 0;

    border-bottom: 1px solid #000;

    }

    </style>

    </head>

    <body>

    <p>This paragraph of <span class="underline_text">text contains a group of underlined</span> words</p>

    </body>

    </html>

    Translate
    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    Jan 4, 2017 8:36 PM UTC

    Unless you're doing something exceptionally weird with your html, text-decoration:underline or the <u> tag will underline the entire word, or group of words, with a continuous line.

    You may be having a display driver issue if the underline is only showing on individual letters.

    How does it appear in each browser?

    Translate
    Inspiring
    Jan 4, 2017 9:14 PM UTC

    Yes that's what it was. I use underline to emphasize my chapter headings (I write stories and post the on a website? so there is no confusion as my stories don't contain links.

    Thanks

    Alan

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Jan 4, 2017 8:29 PM UTC

    If you absolutely must, use the CSS border property instead.

    Incidentally, underlining text in HTML documents is highly discouraged as it implies the underlined text is a hyperlink to more content.   A web page is nothing like a printed page and vice versa.  They each have different presentation rules.

    Nancy

    Translate
    Nancy O'Shea— Product User & Community Expert
    Jon Fritz
    Community Expert
    Community Expert
    Jan 4, 2017 8:29 PM UTC

    How are you adding the underline exactly?

    Translate