Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❀ đŸ’»
We are community that shares solutions with each other.

If you think you have something to add here.

you are welcome with your fresh ideas - List Articles

CSS - how to disable word wrapping in HTML?

0 contributions
7 points

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>
<html>
<head>
  <style>

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

  </style>
</head>
<body>
  <p>
    Very__long__web__page__text__here: 1 2 3 4 5 ...
    Very long web page text here: 1 2 3 4 5 ...
  </p>
</body>
</html>

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?
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more