
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS word-wrap property
The word-wrap property is used to break the line and wrap onto next line.
Example
The following shows sample syntax −
<!DOCTYPE html> <html> <head> <style> div { width: 200px; border: 2px solid #000000; } div.b { word-wrap: break-word; } </style> </head> <body> <h2>word-wrap: break-word property</h2> <div class = "b"> ThisisdemotextThisisdemotext: thisisaveryveryveryveryveryverylongword. The long word wraps to the next line.</div> </body> </html>
Output
- Related Articles
- CSS flex-wrap Property
- Role of CSS flex-wrap property wrap value
- Role of CSS flex-wrap property wrap-reverse value
- Role of CSS flex-wrap property no-wrap value
- CSS word-break property
- Word Wrap Problem
- Animate CSS word-spacing property
- Shorthand CSS property for flex-direction and flex-wrap
- Usage of word-spacing property in CSS
- Modify the behavior of the flex-wrap property with CSS
- How to word-wrap text in Tkinter Text?
- HTML DOM Textarea wrap Property
- How can we implement line wrap and word wrap text inside a JTextArea in Java?
- Wrap the flex items with CSS
- Java Program to set JTextArea to wrap by word in Java

Advertisements