Alignment positions elements along shared edges, centers, or other invisible lines. It gives a page structure and helps people see which pieces of content belong together. A layout can follow the browser’s rules and still feel disjointed if its visual alignments do not support those relationships. section 2.1.2 section 2.3
When arranging a component or page, check three things:
- Edges and centers: do related elements share a clear left, right, top, bottom, or center line? section 2.1.2
- Text: does its alignment reinforce the component’s overall alignment, or make the component feel less cohesive? section 2.1.2
- Sections: is an alignment change helping distinguish content, or merely interrupting the page’s order? section 2.1.2
A headline, description, and button
Picture a headline and button aligned left, with the description between them centered. The pieces can feel disconnected even though they form one group. Aligning all three left gives the group a clearer shared line. section 2.1.2
Figure 2.24 Aligning all the content to the left and moving the hotel name below the image gives the illusion that each component is a rectangle and establishes a more orderly feeling on the page.
Compare this orderly arrangement of hotel cards with the center-aligned names in the preceding example: placing each name below its image and aligning the content left makes each card feel like one unit. section 2.1.2
CSS Grid and Flexbox provide layout structure, but choosing useful alignments is still a design decision. Check alignment while planning the layout, then revisit it as content and components take shape. Use it alongside proximity, repetition, contrast, and balance to make relationships easier to scan. section 2.1.2 section 2.3



