html space between words code example

Example 1: add spaces html

&nbsp;  <!-- 1 space -->
&ensp;	<!-- tab; 2 space -->
&emsp;	<!-- tab; 4 space -->

Example 2: leading spaces html

<!--   Add leading white space in front of text  -->

&nbsp;Hello World

<!--    Output:   ' Hello World'    -->

Example 3: html space between words

<p style="word-spacing: 200px;"> Text with huge spacing between words </p>

Example 4: how to create space inbetween text css

<div style="letter-spacing: 1em;">It's a wide wide word!</div>

<div style="line-height: 1.5;">

<div style="text-indent: 50px;">

Example 5: how to add spaces between text in html

p {
  white-space: pre;
}

Tags:

Misc Example