Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Breaking space (opposite of non-breaking space)

While solving a little bug on a website caused by a non-breaking space ( ) I was wondering if there's an opposite.

Is there an HTML code for a breaking space, and if so, what is it?

I saw mention in this question about a zero-width space (​), but that won't give any width (obviously).

Does an HTML entity exist for a regular space?

like image 305
Sander Koedood Avatar asked Jul 29 '16 14:07

Sander Koedood


People also ask

What is the opposite of &Nbsp?

Recently, I needed the opposite of   - instead of a non-breaking space, I needed a breaking non-space. Luckily, there's a Unicode character that fits this description: it's named the ZERO-WIDTH-SPACE character. When the browser goes to wrap a line, it offers itself up as a valid line-wrap location.

What is the difference between space and non-breaking space?

Your word processor assumes that a word space marks a safe place to flow text onto a new line or page. A nonbreaking space is the same width as a word space, but it prevents the text from flowing to a new line or page. It's like invisible glue between the words on either side.

What is a hard space in word?

In word processing and digital typesetting, a non-breaking space, , also called NBSP, required space, hard space, or fixed space (though it is not of fixed width), is a space character that prevents an automatic line break at its position.

What can I use instead of &Nbsp?

In CSS property padding and margin can be used to tab space instead of non-breaking spaces (nbsp).


3 Answers

  is a regular space (by its numeric ASCII value).

like image 196
Bert Avatar answered Oct 13 '22 06:10

Bert


If you are using HTML and you would like more than one space to to appear, will not work. The unfortunate part about   is it does not wrap properly because it is a non-breaking space.

For those that reached here looking for a solution, try the CSS

white-space: pre-wrap;

This will allow you to have multiple spaces side by side in a single line. It works great for chat programs.

like image 30
Case Avatar answered Oct 13 '22 04:10

Case


There are multiple html entities for regular white space, which allow breaking, for instance  

Read this article for more information: https://www.codetd.com/en/article/6915972

like image 28
Multicolaure Avatar answered Oct 13 '22 06:10

Multicolaure