Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Spaces Between Words in HTML without  

Tags:

html

css

fonts

People also ask

How do I remove extra space between words in HTML?

In this CSS word-spacing example, we have removed 3px of space between the words by setting a -3px value for the word-spacing property. This removes some of the word spacing that has been added by the selected font.

What is &Emsp in HTML?

The   character entity used to denote an 'em' space which means equal to the point size of the current font. This may be perceived as four times the space of a normal space.


Look at the white-space css property

Using

.barcode{
    white-space:pre; /* or pre-wrap if you want wrapping to still work. */
}

and

<span class="barcode">*AA-XXXX    *"</span>

will do the trick.

.barcode{
    font-family:Courier;
    white-space:pre; /* or pre-wrap if you want wrapping to still work.*/
}
<span class="barcode">*AA-XXXX    *"</span>

external demo: http://www.jsfiddle.net/gaby/Z3gkq/


Use <pre> when whitespace is significant.


you can replace all spaces with &#160