CSS Text Wrap
CSS Tutorial » CSS Text Wrap
CSS word-wrap property allows big words to be able to be broken and wrap anywhere on the edge of a box onto the next line.
We can add CSS word-wrap Property as:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the <head> section
External - by using an external CSS file as style.css
Syntax:
Syntax: Internal & External CSS.
word-wrap: normal or break-word or initial or inherit;
Note: use external CSS instead.
How to create CSS word-wrap property - examples
You can try to execute the following code to change CSS word-wrap property of a text on this page.
Example:
Example 1, How to create CSS word-wrap property - examples:
<!DOCTYPE html>
<html>
<head>
<title>How to create CSS word-wrap property - examples - example</title>
<style>
div {
width: 180px;
border: 2px solid #00FF00;
}
div.first_box {
word-wrap: normal;
}
div.second_box {
word-wrap: break-word;
}
</style>
</head>
<body>
<h1>The word-wrap Property</h1>
<h2>word-wrap: normal (this is default property)</h2>
<div class="first_box"> This div contains a very long word:
word-wrap: normal (this is default property) thisisablablarylongwordblarylongwordblarylongwordblarylongword.
The long word will break and wrap to the next line.</div>
<h2>word-wrap: break-word:</h2>
<div class="second_box"> This div contains a very long word:
will break and wrap - thisisablablarylongwordblarylongwordblarylongwordblarylongwordblarylongword.
The long word will break and wrap to the next line.</div>
</body>
</html>
Note: Use external CSS instead.
css text wrap, around div, ellipsis, in div, around image, responsive, around circle, white space, none, 2 lines
CSS Text Wrap - css tutorial
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.