![]() |
VOOZH | about |
The page-break-inside property in CSS is used to specify how the page breaks inside the element to which it is applied while printing. It inserts a page break or sometimes it is used to avoid a page break inside an element while printing.
Syntax:
page-break-inside: auto|avoid|initial|inherit
Property Values:
Syntax:
page-break-inside: auto;
Syntax:
page-break-inside: avoid;
Syntax:
page-break-inside: initial;
Syntax:
page-break-inside: inherits;
Note: This property is mostly used to print a document.
Print Media Query:
@media print {
img {
display: block;
page-break-inside: avoid;
}
}
Example 1: This example uses page-break-inside property value to avoid.
Output:
Print Preview:
Example 2: This example use page-break-inside property value to none.
Output:
Print Preview:
Supported Browsers: The browser supported by page-break-inside property are listed below: