MDN The break-afterCSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored.
<div> <p> The effect of this property can be noticed when the document is being printed or a preview of a print is displayed. </p> <button id="print-btn">Show Print Preview</button> <div class="box-container"> <div class="box">Content before the property</div> <div class="box" id="example-element">Content with 'break-after'</div> <div class="box">Content after the property</div> </div></div>
MDN The break-beforeCSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored.
<div> <p> The effect of this property can be noticed when the document is being printed or a preview of a print is displayed. </p> <button id="print-btn">Show Print Preview</button> <div class="box-container"> <div class="box">Content before the property</div> <div class="box" id="example-element">Content with 'break-before'</div> <div class="box">Content after the property</div> </div></div>
MDN The break-insideCSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored.
<div> <p> The effect of this property can be noticed when the document is being printed or a preview of a print is displayed. </p> <button id="print-btn">Show Print Preview</button> <div class="box-container"> <div class="box">Content before the property</div> <div class="box" id="example-element">Content with 'break-inside'</div> <div class="box">Content after the property</div> </div></div>
<div> <p>This is the first paragraph containing some text.</p> <p> This is the second paragraph containing some more text than the first one. It is used to demonstrate how orphans work. </p> <p> This is the third paragraph. It has a little bit more text than the first one. </p></div><form> <input type="checkbox" id="orphans" checked /> <label for="orphans">Apply orphans: 2</label></form>
Syntax
<integer [1,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
2
Applies to
block containers that establish an inline formatting context
Inherited
yes
Percentages
n/a
Computed value
specified integer
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting orphans
Chrome
25
Edge
12
Firefox
No
Safari
1.3
Chrome Android
25
Safari iOS
1
First version with support, from MDN browser-compat-data.
<div> <p>This is the first paragraph containing some text.</p> <p> This is the second paragraph containing some more text than the first one. It is used to demonstrate how widows work. </p> <p> This is the third paragraph. It has a little bit more text than the first one. </p></div><form> <input type="checkbox" id="widows" checked /> <label for="widows">Apply widows: 2</label></form>
Syntax
<integer [1,∞]>
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
2
Applies to
block containers that establish an inline formatting context
Inherited
yes
Percentages
n/a
Computed value
specified integer
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting widows
Chrome
25
Edge
12
Firefox
No
Safari
1.3
Chrome Android
25
Safari iOS
1
First version with support, from MDN browser-compat-data.