Gets or sets a value that indicates whether lines are automatically broken inside the object.
HRESULT IHTMLStyle::get_whiteSpace(BSTR *p);HRESULT IHTMLStyle::put_whiteSpace(BSTR v);
- Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
- BSTR that specifies one of the values listed in Possible Values.
normal Default. Lines of text break automatically. Content wraps to the next line if it exceeds the width of the object. nowrap Line breaks are suppressed. Content does not wrap to the next line. pre Line breaks and other whitespace are preserved. This possible value is supported in Microsoft Internet Explorer 6 and later when the !DOCTYPE declaration specifies standards-compliant mode. When the !DOCTYPE declaration does not specify standards-compliant mode, you can retrieve this value, but it does not affect rendering—it functions like the
pre-line Sequences of line breaks are preserved. pre-wrap Sequences of line breaks are collapsed.
Returns S_OK if successful, or an error value otherwise.
Whitespace, such as line breaks, spaces, and tabs, is collapsed by default in HTML documents. You can use the nonbreaking space entity
( )to add extra spaces to an object when the IHTMLStyle::whiteSpace property is set to
nowrap. You can add extra line breaks using the br element.
This property affects content you access through the Document Object Model (DOM) the same way it affects the way Windows Internet Explorer displays the content.
In Internet Explorer 6 and later, this property applies to the currentStyle element. The
prevalue of this property is now supported.
Internet Explorer 8. The
pre-wrapvalues are used to control sequences of whitespace. A value of
pre-lineinstructs Internet Explorer to combine multiple line breaks into a single line, whereas
pre-wrapwraps each newline onto a separate line. Inside a pre block, lines breaks occur at newlines in the source, at occurrences of "\A" in generated content ( :before and :after), and as necessary to fill line boxes.