Which of the following property defines the minimum number of lines in a paragraph to be left at the top of a page?

white-space
widows
display
width

The correct answer is: A. white-space

The white-space property defines the minimum number of lines in a paragraph to be left at the top of a page. It can be used to prevent a paragraph from being split across two pages.

The widows property defines the minimum number of lines that should remain at the bottom of a page when a paragraph is split across two pages.

The display property defines how an element is displayed. It can be used to display an element as a block, inline, or inline-block.

The width property defines the width of an element. It can be used to specify the width of a block element, or the width of an inline element that is not inline-block.

Here is an example of how the white-space property can be used:

css
p {
white-space: pre-line;
}

This CSS will prevent a paragraph from being split across two pages. The pre-line value for the white-space property tells the browser to preserve the white space in the paragraph, even if it means that the paragraph will not fit on a single page.

Exit mobile version