Skip to main content

Alignment

UI Design

What is Alignment

Alignment is the placement of elements along shared edges or lines. When titles, text, images and buttons line up, a layout looks orderly and is easier to scan. Misaligned elements look careless, even when users cannot say why.

Types of Alignment

  • Left: Elements share a left edge. Best for body text in left-to-right languages
  • Right: Elements share a right edge. Useful for numbers in tables
  • Center: Elements share a center line. Use for short headings and single lines
  • Justified: Text meets both edges, which can create uneven gaps

How to use Alignment

Give each group one visual starting point, usually a shared left edge. Align elements to a grid so different parts of the page line up. Right-align numbers with the same number of decimals so values are easy to compare.

Why Alignment matters

Alignment creates order and connects related items. Users notice small misalignments.

Frequently asked questions

Should text be left-aligned or centered?

In left-to-right languages, left-align body text, labels and lists, because a shared left edge makes it easy to find the start of each line. Centered text can work for short headings and single lines.

How should numbers be aligned in a table?

Right-align numbers and give them the same number of decimal places. Digits then line up by place value, which makes comparing values faster.

What are the main types of text alignment?

Flush left (ragged right), flush right (ragged left), centered and justified, where spacing is adjusted so text meets both margins.