CSS - how to disable word wrapping in HTML?

7 points
Created by:

Using CSS it is possible to remove word wrapping in following ways.

Note: read this article how to disable line wrapping, beacuse indirectly it solves the problem of world wrapping.

1. word-wrap: keep-all example

This solution prevents of long words breaking.

// ONLINE-RUNNER:browser;

<!doctype html>

    p {
        border: 1px solid black;
        width: 200px;
		word-wrap: keep-all;

    Very__long__web__page__text__here: 1 2 3 4 5 ...
    Very long web page text here: 1 2 3 4 5 ...

See also

  1. CSS - how to disable line wrapping in HTML?

Merged quastions

  1. CSS - how to turn off world wrapping in HTML?
  2. CSS - how to remove world wrapping in HTML?
Native Advertising
50 000 ad impressions - 449$
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

‚̧ԳŹūüíĽ ūüôā