YouTip LogoYouTip

Prop Style Wordwrap

# Style wordWrap Property [![Image 8: Style Object Reference](#) Style Object](#) ## Example Allow long words to be broken and wrap onto the next line: document.getElementById("myDIV").style.wordWrap="break-word"; [Try it Yourself Β»](#) * * * ## Definition and Usage The wordWrap property allows long words to be broken and wrapped onto the next line. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The wordWrap property is supported in all major browsers. * * * ## Syntax Get the wordWrap property: _object_.style.wordWrap Set the wordWrap property: _object_.style.wordWrap="normal|break-word|initial|inherit" ## Property Values | Value | Description | | --- | --- | | normal | Break words only at allowed break points (browser default behavior). | | break-word | Break long words at any character if necessary. | | initial | Sets this property to its default value. Read about _initial_. | | inherit | Inherits this property from its parent element. Read about _inherit_. | ## Technical Details | Default Value: | normal | | --- | --- | | Return Value: | A String, representing the word-wrap property of an element. | | CSS Version | CSS3 | * * * ## Related Articles CSS Reference: (#) * * Style Object](#)
← Php NamespaceProp Style Wordbreak β†’