How to disable word breaking in CSS?

css word-break
css prevent word-break hyphen
css wrap text to next line
mdn word-wrap
css break long words
css nowrap div
white-space nowrap not working
css ellipsis

How to disable breaking words into parts when wrapping lines in CSS? For example, currently, if it has no space, it writes word "impossible" in the following way:

I think it is not im-

i would like it write

I think it is not

i.e. wrap entire word "impossible" to next line, not only part of it.

I don't wish to change text alignment.


The answer proposed here: Stop word-wrap dividing words look irrational or tricky, because white-space property has no possible value of wrap, described here

Also, the overall topic of white-space is different and described as "specifies how white-space inside an element is handled" (see link above).

So, I can't regard the answer about white-space as correct and/or duplicate.

word-break: keep-all; will keep words whole.

Prevent word breaks, I've tried different white-space and word-break properties. How can I get the text on these paragraphs to avoid hyphened word breaks and have  To prevent overflow, word may be broken at any character. keep-all. Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as value "normal". break-word. To prevent overflow, word may be broken at arbitrary points. initial. Sets this property to its default value.

I consider wrong solution the "white-space" with "nowrap" or "pre" too, it is not doing the correct behaviour. The text should break lines, but not break words. This is caused by some css attributes: word-wrap, overflow-wrap, word-break, hyphens. So you can have either:

word-break: break-all;
word-wrap: break-word;
overflow-wrap: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;

Remove them, or override them with "unset" or "normal":

word-break: unset;
word-wrap: unset;
overflow-wrap: unset;
-webkit-hyphens: unset;
-moz-hyphens: unset;
-ms-hyphens: unset;
hyphens: unset;

JSfiddle provided:

white-space, Let's say you have HTML exactly like this: A bunch of words you. Finally, white-​space: pre-line; will break lines where they break in code, but  Has the same effect as word-break: normal and overflow-wrap: anywhere, regardless of the actual value of the overflow-wrap property. Note: In contrast to word-break: break-word and overflow-wrap: break-word (see overflow-wrap ), word-break: break-all will create a break at the exact place where text would otherwise overflow its container (even if putting an entire word on its own line would negate the need for a break).

Do you mean:

.word {
    word-wrap: break-word;


overflow-wrap, Lines may only break at normal word break points (such as a space between two words). anywhere: To prevent overflow, an otherwise  The word-break property in CSS can be used to change when line breaks ought to occur. Normally, line breaks in text can only occur in certain spaces, like when there is a space or a hyphen. In the example below we can make the word-break between letters instead: p { word-break: break-all; }

word-break, The word-break CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. Break words only at allowed break points. break-word. Allows unbreakable words to be broken. initial. Sets this property to its default value. Read about initial. inherit. Inherits this property from its parent element.

CSS white-space property, Text will never wrap to the next line. The text continues on the same line until a <​br> tag is encountered, Play it ». pre, Whitespace is preserved by the browser. The text should break lines, but not break words. This is caused by some css attributes: word-wrap, overflow-wrap, word-break, hyphens . So you can have either:

CSS word-break property, Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java  Delete a section break. If you added section breaks to your document, the easiest way to see where they begin and end is to show formatting marks. Go to Home, and select Show all nonprinting characters.

  • (5s on google)
  • Do you have a word-break: break-all anywhere in your CSS? Please show us your code as I don't think what you have posted is the default behavior.
  • possible duplicate of Stop word-wrap dividing words
  • @IsmaelMiguel I was confused by "duplicate" question and it's clones, reproducing strange approach with white-space property
  • @Dims What do you mean?
  • This looks the only reasonable answer.
  • Remember to mark an answer @Dims if you've found one!
  • I did and word-wrap fit's the best. word-break would break it to i{NEWLINE}mpossible (Ref: and the way I testet word-wrap works like he wanted. There is a chance I missunderstood the question, but lets wait for more input from the creator.
  • Read again. OP doesn't want the work to break. The question is poorly worded, but it comes across as pretty clear to me.