EN
CSS - how to disable word wrapping in HTML?
10 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.
This solution prevents of long words breaking.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
p {
7
border: 1px solid black;
8
width: 200px;
9
word-wrap: keep-all;
10
}
11
12
</style>
13
</head>
14
<body>
15
<p>
16
Very__long__web__page__text__here: 1 2 3 4 5 ...
17
Very long web page text here: 1 2 3 4 5 ...
18
</p>
19
</body>
20
</html>