Not adding space in HTML

ktjstn
Kilo Expert

Why it is not adding space? 

find_real_file.png

Here's my script: <p>Provide   <b style="color: red;">CHANGE</b>  description details below.</p>

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Kate,

While adding space in html you need to use the &nbsp; which allows you to create multiple spaces that are visible but not present in the html source code

it is the character entity for space

so use this

If you want 1 space then use &nbsp; 1 time; if you require 2 spaces then use that character 2 times and so on

<p>Provide&nbsp;<b style="color: red;">CHANGE</b>&nbsp;description details below.</p>

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

find_real_file.png

I am getting this error.

Hi 

Try this 

<pre>Provide   <b style="color: red;">CHANGE</b>  description details below.</pre>

 

PS - The <pre> tag is used with preformatted text. It instructs the browser that the text is to appear exactly as written in the HTML file, including any spaces or blank lines. If you type five spaces inside <pre> tags, you get five spaces on the website.character

 

Hope this helps.

 

Regards,

Omkar Mone

When I use <pre>. It looks like this

 

find_real_file.png

Hi 

I tried with this - <p>Provide <strong style="color: red;">CHANGE</strong> description details below.</p>

 

And the result is- 

find_real_file.png

 

Regards,

Omkar Mone