Design glossaryAlignment is how the edges and centers of text, images, and other elements line up on a page. Consistent alignment makes a layout look orderly and easier to scan.
Alignment is the decision about which edge, or which center line, each element on a page shares with the elements around it. When a heading, a paragraph, an image, and a button all start on the same left edge, the eye reads them as one group and moves down the page without effort. When each one starts a few pixels off, the layout looks careless even if nobody can say exactly why.
It is one of the cheapest ways to make a page look designed. It costs nothing to load, and it does most of its work invisibly.
Types of alignment
Text alignment
- Left aligned (flush left, ragged right): every line starts at the same edge, so the eye always knows where the next line begins. It is the default for body text in left-to-right languages and the safest choice for anything longer than a few lines.
- Right aligned (flush right): useful for short items such as numbers in a table column, dates, or captions set against a right edge. Long passages are hard to read because every line starts in a different place.
- Centered: suits short headings, hero text, and invitations. Several lines of centered body copy force the reader to hunt for the start of each line.
- Justified: both edges are straight. Print typesetting handles this with careful hyphenation and spacing; browsers are much cruder, so justified web text often shows uneven word gaps and "rivers" of white space running down the column.
For right-to-left languages such as Arabic and Hebrew, the natural edge is the right. In CSS, text-align: start follows the language direction instead of hard-coding left.
Layout alignment
Beyond text, alignment is about the edges of boxes: columns, cards, images, and form fields. Edge alignment (lining things up on a shared left or right edge) usually reads as stronger and more modern than center alignment, which can make a layout feel static. Center alignment works well for symmetrical, formal compositions and single focal points.
Why alignment matters
- It creates groups. Elements that share an edge and sit close together are read as related, which supports visual hierarchy.
- It makes pages scannable. A strong left edge gives readers a line to run their eye down when skimming headings and lists.
- It signals care. Small misalignments, such as an icon sitting slightly above its label, make a site feel unfinished.
How to get alignment right
- Work on a grid. A column grid, built with CSS grid layout or a theme's container widths, gives every element a set of edges to snap to.
- Pick one or two alignment lines per section and stick to them, rather than inventing a new edge for each element.
- Use spacing deliberately. Consistent margins and white space keep aligned elements from feeling cramped.
- Allow for optical alignment. Round letters like O and pointed shapes like play icons can look misaligned even when their boxes line up mathematically. Designers sometimes nudge them by a pixel or two, or hang quotation marks into the margin, so they look aligned.
Alignment in WordPress
The block editor gives most blocks alignment controls in the toolbar: text alignment for paragraphs and headings, and block alignment (left, center, right, wide, and full width) for images, groups, and covers. Wide and full alignments only appear when the theme supports them. Classic themes opt in with add_theme_support( 'align-wide' ); block themes set content and wide widths in theme.json. If wide images refuse to break out of the text column, the theme's layout settings are usually the reason.
Common mistakes
- Centering long paragraphs or bulleted lists.
- Justifying narrow columns on mobile, where word gaps become huge.
- Mixing left-aligned headings with centered body text in the same section.
- Letting elements in a row sit at slightly different heights because their padding differs.