Menu Close

How Can I put an Overlin Over Text in HTML

Posted in HTML Tutorial

In the same manner as you can underline text, you can also have an overline, i.e. a line over the text.

html

The overline can only be done i one way: STYLE=”text-decoration:overline”. The style has to be applied on a tag for a text section e.g.  <P>, <DIV> and <SPAN>. Due to the way text decorations are normally used in a text, <SPAN> will usually be a good solution as it doesn’t add any other formatting to the text string.

A piece of text with overline will look like this as code:

<span style="text-decoration: overline;">here the text has overline</span>

 

On the page, when shown, it looks like this:

here the text has overline

Related:   What is JavaScript?

Leave a Reply