Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML equivalent to   ...that DOES break;

If I want to force two visually displayed two spaces I can do this:

FOO BAR  FOO BAR

This would sidestep HTML's whitespace collapsing feature, but it also would result in line breaks like this:

FOO 
BAR  FOO 
BAR

Is there a replacement that would act like a regular space that does break? Here's pseudo code for what I'm asking:

FOO
BAR&bsp;&bsp;
FOO
BAR

ps: I know this can be done with CSS. Not not what I'm interested in here.

like image 830
emersonthis Avatar asked Jun 28 '14 16:06

emersonthis


1 Answers

If you want a wider-than-normal space that doesn't prevent line breaks, you probably want either an en space (U+2002,  ) or an em space (U+2003,  ). Typically, an en space is twice as wide as a normal space, and an em space is four times as wide.

like image 123
Wyzard Avatar answered Oct 06 '22 08:10

Wyzard