Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1text-align: left; | ASets up a grid layout so elements snap into shared columns and line up with each other. | |
| 2display: grid; grid-template-columns: 1fr 1fr; | BThe fields are misaligned because each starts at a different x position, so the left edges do not match and the form looks messy. | |
| 3Left alignment: labels and fields in a form all start at the same left edge | CLines text up along a common left edge, which is easy to scan for labels and lists. | |
| 4Grid layout: three cards sit in equal columns so their edges line up | Dlabel, input { display: block; margin-left: 0; } | |
| 5Name field starts at x=20, Email field at x=35, Phone field at x=28 | EThe buttons mix alignments, so there is no common edge or centre and the layout looks inconsistent. | |
| 6Button 1 is centred, Button 2 is left-aligned, Button 3 is right-aligned | Fgrid-template-columns: repeat(3, 1fr); |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
alignment — A UI design principle that lines up elements along common edges or centres, such as a left edge or grid, so the layout looks tidy and is easy to scan.p {
text-align: left;
}.layout {
display: grid;
}.layout {
grid-template-columns: 1fr 1fr 1fr;
}.menu {
display: flex;
align-items: center;
}.label {
margin-left: 0;
}