+ 3
How to print more spaces to screen in HTML?
3 Respostas
+ 5
There are many ways:
1- Use <pre> tag. It shows a text in its original format.
2- Use CSS white-space property and set it to pre (white-space: pre).
3- Use (Non-Breaking Space).
+ 3
if you want to add space between words, you can add css with a syntax like this :
[selector] {white-space: pre}
or if you want to set space between line, you can use css with syntax like this :
[selector] {line-height: 1.5em}
Note :
change 1.5em as you wish
change [selector] with a selector you want to stylize. Eg. if you want to stylize <p> elements. Just change the [selector] with p
+ 2
use a non-breakable space
&nbsp;