You are here: Reference > JavaScript > client-side > style handling > properties > lineBreak

lineBreak style property

Browser support:
Specifies or returns the line-breaking rules for Chinese, Japanese or Korean text.
This property is deprecated, use the wordBreak property instead.


You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: line-break

Possible values:

The type of this property is string.
 One of the following values: 
Default. Normal line-breaking rules are applied.
Stricter line-breaking rules are enforced.
Default: normal.

Example HTML code 1:

This example shows how the line-break property should work:
        .example {
            line-break: strict;
    <!-- The sky is as blue as blue can be.-->
    <span class="example">空はあくまでも青い。</span>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the lineBreak property in JavaScript:
    <script type="text/javascript">
        function ChangeLineBreak (selectTag) {
            // Returns the index of the selected option
            var whichSelected = selectTag.selectedIndex;

            // Returns the selected options values
            var breakType = selectTag.options[whichSelected].text;

            var span = document.getElementById ("mySpan");

            if ('lineBreak' in {
       = breakType;
            } else {
                alert ("Your browser doesn't support this example!");
    <!-- The sky is as blue as blue can be.-->
    <span id="mySpan" class="example">空はあくまでも青い。</span>

    <br />
    <select onchange="ChangeLineBreak (this);" size="2">
        <option selected="selected" />normal
        <option />strict
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content