Complete the code to align the text to the center.
p {
text-align: [1];
}The text-align property controls horizontal alignment of text. Using center centers the text inside its container.
Complete the code to align the heading text to the right.
h1 {
text-align: [1];
}The text-align property with value right moves the text to the right side of its container.
Fix the error in the code to justify the paragraph text.
p {
text-align: [1];
}The text-align property needs a value and a semicolon. The value justify spreads text evenly across the line width.
Fill both blanks to align the heading text to the left and set its color to blue.
h2 {
text-align: [1];
color: [2];
}The text-align property with left aligns text to the left. The color property with blue changes the text color to blue.
Fill all three blanks to align the paragraph text to the center, set font size to 1.5rem, and color to dark gray.
p {
text-align: [1];
font-size: [2];
color: [3];
}text-align: center; centers the text horizontally. font-size: 1.5rem; sets the font size relative to root font size. color: #333333; sets a dark gray color for the text.