wordWrap property
[This documentation is preliminary and is subject to change.]
Sets or retrieves whether to break words when the content exceeds the boundaries of its container.
Syntax
HRESULT value = object.put_wordWrap(BSTR v);HRESULT value = object.get_wordWrap(BSTR* p);
Property values
Type: BSTR
normal (normal)
Default. Content exceeds the boundaries of its container.
break-word (break-word)
Content wraps to next line, and a word-break occurs when necessary.
String format
normal | break-word
CSS information
Applies To | All elements |
Media | visual |
Inherited | 1 |
Initial Value |
Standards information
- CSS Text Level 3, Section 7.2
Remarks
Windows Internet Explorer 8. The -ms-word-wrap attribute is an extension to CSS, and can be used as a synonym for word-wrap in IE8 Standards mode.
Use this property to enable the browser to break up otherwise unbreakable strings.
This differs from the white-space property, which turns wrapping of the text on and off. The -ms-word-wrap property addresses only whether wrapping is permitted to occur at a place in the word that is not otherwise allowed by the language rules in effect.
This property is read-only for the IHTMLCurrentStyle2 interface.
This property is read-only for the currentStyle object.
This property applies to elements that have layout. An element has layout when it is absolutely positioned, is a block element, or is an inline element with a specified height or width.
Examples
The word "blonde" is not wrappable under typical English rules. But, when wordWrap is set to break-word, the word "blonde" can be split onto two lines in any way the browser chooses: such as "b" and "londe", or "blo" and "nde".
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Header |
Mshtml.h |
IDL |
Mshtml.idl |
DLL |
Mshtml.dll |
See also
Reference
Build date: 1/23/2012