-3

Suppose I have word Abhishek Mane I want to make this as follows Abhishek_____________________________ Mane. Underscore(_) indicates spaces that i want

  • 3
    Does this answer your question? [How to stop Browser from replacing multiple space by single space?](https://stackoverflow.com/questions/36259826/how-to-stop-browser-from-replacing-multiple-space-by-single-space) – Run_Script Jan 26 '20 at 15:17

4 Answers4

2

just use the pre tag

<div class="wrap">
<pre>
 Abhishek               Mane</pre>
</div>
DCR
  • 14,737
  • 12
  • 52
  • 115
1

There are three different ways to achieve this:

1. Margins

You could put each word into its own span, and then give the first word a margin-right to add some space between the two.

.first-word {
  margin-right: 100px;
}
<span class="first-word">Abhishek</span> <span>Mane</span>

2. Forced spaces

Alternatively, you can force spaces using &#160;.

Abishnek&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Mane

A very similar thing can be achieved with &nbsp.

Abishnek&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mane

3. The pre tag

<div class="wrap">
  <pre>Abhishek               Mane</pre>
</div>
Run_Script
  • 2,487
  • 2
  • 15
  • 30
0

HTML doesn't support normal spaces more than one. Then you have to add &nbsp; for multiple spaces. But it is bit longer

Abhishek &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mane
Ritesh Khandekar
  • 3,885
  • 3
  • 15
  • 30
0

the HTML

 Abhishek <a class="tab">Mane </a> 

CSS

.tab {
    margin-left: 2.5em
   }
Khaled
  • 1
  • 1