<html>
<body>
<div id="myD"
style="width:300px; background-color:beige;">
This is a sample paragraph.
This is a sample paragraph.
This is a sample paragraph.
This is a sample paragraph.
This is a sample paragraph.This is a sample paragraph.
This is a sample paragraph.
This is a sample paragraph.This is a sample paragraph.
This is a sample paragraph.
</div>
<br>
<input type="button"
value="Set wordBreak property to break-all"
onclick="myD.style.wordBreak='break-all'">
</body>
</html>