Set text in the <p> element to break between any two letters. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set text in the <p> element to break between any two letters.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
p {<!-- ww  w.  j  a va  2 s .com-->
    width: 150px;
    border: 1px solid #000000;
    word-break: break-all;
}
</style>
</head>
<body>

<p>This paragraph contains a very long word: asdf-asdf-asdf-asdfasdfasdf-asdfasdfasdfasfdasfd.</p>

</body>
</html>

Related Tutorials