← VCE Software Development U3O2

UI design principle: 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.

Understanding UI design principle: alignment in VCE Software Development U3O2

What it does: Giving the labels and inputs the same left position means they share one left edge, which is left alignment. repeat(3, 1fr) creates three equal columns, so the cards line up neatly along shared column edges. Misaligned elements have no shared edge or centre. This makes the screen look untidy and harder to scan. Left-aligned text gives a strong common edge. Users can scan down the start of each line quickly. A grid gives common edges and centres for elements to snap to. This keeps the layout consistent. Alignment organises where elements sit. Contrast makes elements stand out by using differences such as colour or size.

Common mistakes: A row puts the items side by side, so they no longer share one left edge. Use flex-direction: column so the items stack and line up along the left. align-items works vertically inside each cell. To line up the items along the left edge of each column, use justify-items: start.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 110–119) and word search (Modules 86–119).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which layout follows the alignment principle?
Each label and text box starts at a different distance from the leftLabels and text boxes all start on the same left edge
Matches
Name field starts at x=20, Email field at x=35, Phone field at x=28
↓
The fields are misaligned because each starts at a different x position, so the left edges do not match and the form looks messy.
Applying
Meanings
Term
alignment
Meaning
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.
Practice
<style>
Testing
Gaps
text-align: ;
Check Answer
Spots
2 display: flex;
3 flex-direction: row;

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Ermine' badge — Tundra Streak, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which layout follows the alignment principle?
A. Each label and text box starts at a different distance from the left
B. Labels and text boxes all start on the same left edge ✓
Alignment lines elements up along a common edge, such as a left edge, so the layout looks tidy and is easy to scan.
2. A form has its labels placed at random horizontal positions. What is the design problem?
A. The elements are misaligned, so the layout looks messy ✓
B. The elements have too much contrast
Misaligned elements have no shared edge or centre. This makes the screen look untidy and harder to scan.
3. Why is left alignment commonly used for blocks of text in an interface?
A. Each line starts at the same point, so the eye can scan down easily ✓
B. It makes the text bigger and bolder
Left-aligned text gives a strong common edge. Users can scan down the start of each line quickly.
4. Which tool helps a designer apply alignment across a whole screen?
A. A random placement of elements
B. A grid layout with columns and rows ✓
A grid gives common edges and centres for elements to snap to. This keeps the layout consistent.
5. A button sits 10 pixels to the right of the text box above it, and nothing else is offset. What should the designer do?
A. Line the button's left edge up with the text box's left edge ✓
B. Leave it, because small offsets make a layout look tidier
A small offset looks like a mistake. Elements should share a common edge or centre.

Match the Pairs

text-align: left; → Lines text up along a common left edge, which is easy to scan for labels and lists.
display: grid; grid-template-columns: 1fr 1fr; → Sets up a grid layout so elements snap into shared columns and line up with each other.
Left alignment: labels and fields in a form all start at the same left edge → label, input { display: block; margin-left: 0; }
Grid layout: three cards sit in equal columns so their edges line up → grid-template-columns: repeat(3, 1fr);
Name field starts at x=20, Email field at x=35, Phone field at x=28 → The fields are misaligned because each starts at a different x position, so the left edges do not match and the form looks messy.
Button 1 is centred, Button 2 is left-aligned, Button 3 is right-aligned → The buttons mix alignments, so there is no common edge or centre and the layout looks inconsistent.

Key Term

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.

Fill in the Blanks

1. p { text-align: left; }
Hint: Type the value that lines text up along the left edge so every line starts in the same place.
2. .layout { display: grid; }
Hint: Type the layout keyword that arranges elements into neat rows and columns.
3. .layout { grid-template-columns: 1fr 1fr 1fr; }
Hint: Type the word that defines the vertical tracks the grid uses to line up its items.
4. .menu { display: flex; align-items: center; }
Hint: Type the value that lines the items up along their shared middle.
5. .label { margin-left: 0; }
Hint: Type the number that removes the extra offset so a misaligned element lines up with the left edge of the others.

Spot the Error

Question 1
A .menu {
B display: flex;
C flex-direction: row;
D align-items: flex-start;
E }
Line C — A row puts the items side by side, so they no longer share one left edge. Use flex-direction: column so the items stack and line up along the left.
Question 2
A .gallery {
B display: grid;
C gap: 16px;
D align-items: start;
E }
Line D — align-items works vertically inside each cell. To line up the items along the left edge of each column, use justify-items: start.
Question 3
A .article p {
B margin-bottom: 12px;
C text-aling: left;
D }
Line C — The property name is misspelled, so the browser ignores it. It must be text-align: left so every paragraph starts on the same left edge.
Question 4
A .nav a {
B display: inline-block;
C width: 80px;
D text-align: middle;
E }
Line D — middle is not a valid text-align value, so the links are not centred in their equal-width boxes. The correct value is center.
Question 5
A .label {
B margin-left: 35px;
C }
D .input {
E margin-left: 20px;
F }
Line B — The label and input need the same left margin to share one left edge. 35px makes them misaligned, so it should be 20px.

Student with a class code? Join your class →