Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML opposite of non-breaking space

Tags:

html

css

In my HTML I have a very long word and I'm trying to force a specific break point only when there isn't enough room. What I need is a sort of conditional-breaking placeholder. How can I achieve this sort of thing?

like image 755
Andrew Avatar asked Jan 30 '13 22:01

Andrew


People also ask

What is opposite of &nbsp in HTML?

<p>lorem ipsum here&nbsp;are&nbsp;some&nbsp;words and so on</p> | lorem ipsum | | here are some words and so | | on | What's the opposite of that? That is, a character which is NOT rendered as a space, but CAN be used for line breaking. <p>foo supercalifragilisticexpialidocious bar</p> <!--

What is the difference between &NBSP and space?

Alternatively called a fixed space or hard space, NBSP (non-breaking space) is used in programming and word processing to create a space in a line that cannot be broken by word wrap. With HTML, &nbsp; lets you create multiple spaces that are visible on a web page and not only in the source code.

What is a nonbreaking space in HTML?

A commonly used entity in HTML is the non-breaking space: &nbsp; A non-breaking space is a space that will not break into a new line. Two words separated by a non-breaking space will stick together (not break into a new line).


1 Answers

Maybe the Unicode zero-width space would help: http://www.fileformat.info/info/unicode/char/200b/index.htm

The HTML entity is &#8203; e.g. over&#8203;flow will break the word between "over" and "flow" only when the full word doesn't fit.

like image 103
Ned Batchelder Avatar answered Sep 16 '22 14:09

Ned Batchelder