Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Add a Dotted Underline Beneath HTML Text

Tags:

html

underline

How do you underline html text so that the line beneath the text is dotted rather than the standard underline? Preferably, I would like to do this without using a separate CSS file. I'm a novice at html.

like image 843
parap Avatar asked Mar 06 '13 16:03

parap


People also ask

How do I type a dotted underline?

click on U (underline). right-click that word and choose Font. in the font box, look for "undeline style" and choose the second dotted sample. this should put dots under the needed word.

How do you add a dashed underline in CSS?

Adding a dotted or double underline The text-decoration property does not have a “double” or “dotted” value. Instead, you can use the border-bottom property to add double or dotted underlining. You can remove a link's default underline by setting the text-decoration proeprty to “none.”

What is the HTML tag for underline?

<u>: The Unarticulated Annotation (Underline) element. The <u> HTML element represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a simple solid underline, but may be altered using CSS.

How do you underline a paragraph in HTML?

The <u> tag represents some text that is unarticulated and styled differently from normal text, such as misspelled words or proper names in Chinese text. The content inside is typically displayed with an underline. You can change this with CSS (see example below).


1 Answers

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> 
like image 170
Alfred Xing Avatar answered Sep 17 '22 14:09

Alfred Xing