Writing a flowchart as text in Mermaid
Starts a Mermaid script that draws a flowchart top-down. Shapes are an id plus text, like A[Step] or B{Question?}, joined by --> arrows.
Understanding Writing a flowchart as text in Mermaid in ACARA Digital Technologies Years 7–8
What it does: Square brackets after the id make a rectangle, which is used for a step or action. Curly brackets make a diamond for a question, and -->|Yes| puts a label on the arrow that leaves it. A Mermaid script always begins with flowchart TD. TD means top-down, so the shapes are drawn from top to bottom. The arrow --> joins two shapes and shows which way the flow goes. Two dashes alone draw a line with no arrowhead. Put the label between two vertical bars straight after the arrow, like -->|Yes|. Without the bars, Yes would be read as another shape.
Common mistakes: A diamond must open with { and close with }. The line mixes { with ], so it should be B --> C{Is it even?}. Mermaid arrows need two dashes and a greater-than sign. -> is wrong, so the line should be C -->|Yes| D[Win].
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 365–411) and word search (Modules 331–411).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
flowchart TDFill in the Blanks
Spot the Error
Student with a class code? Join your class →