Complete the code to set the line height of paragraphs to 1.5.
p {
line-height: [1];
}The line-height property controls the space between lines of text. Using 1.5 sets the line height to one and a half times the font size, which improves readability.
Complete the code to set the line height of headings to 2.
h1 {
line-height: [1];
}Setting line-height to 2 doubles the space between lines relative to the font size, making headings more spaced out.
Fix the error in the code to correctly set line height to 1.2.
div {
line-height: [1];
}Using a unitless number like 1.2 for line-height is best practice because it scales with the font size. Adding units like em or px can cause inconsistent spacing.
Fill both blanks to set line height to 1.4 and font size to 16px.
p {
font-size: [1];
line-height: [2];
}Setting font-size to 16px defines the text size. Setting line-height to 1.4 means the space between lines is 1.4 times the font size, improving readability.
Fill all three blanks to set font size to 18px, line height to 1.6, and paragraph color to blue.
p {
font-size: [1];
line-height: [2];
color: [3];
}Setting font-size to 18px makes text larger. line-height of 1.6 adds comfortable spacing between lines. color: blue changes text color to blue.