Sub topic 2
Line: the basic mark
This chapter assumes you have used a drawing or design tool, on paper or on screen. It also assumes you know everyday layout words such as image, headline, and margin. You do not need to know any code, although a few small SVG examples are included so you can try the ideas yourself.
What a line is
A line is a mark that is much longer than it is wide. A pencil stroke, a pen path, a crack in a wall and a horizon all count. Line is usually the first element of design a person meets, because most tools begin with it. Pencils, brushes, and the pen tool in vector software all leave a trail.
Geometry defines a line as a path with length and no width. A drawn line always has some width, so the visual definition is different: a line is a mark whose length dominates its width. Width is not a fixed number. A 2 px stroke that is 400 px long reads as a line. The same 2 px stroke that is 3 px long reads as a dot.
Line is also relative to its surroundings. A thin rule between paragraphs is clearly a line. A very tall, narrow rectangle with a 20 px width can read as either a line or a shape, depending on the canvas and what sits next to it. When you cannot tell, ask whether the eye follows the mark along its length (line) or takes in its whole area at once (shape).
What a line does
Lines do work in a layout. Six jobs cover most cases:
- Outline. A line traces the edge of an object and defines its contour. Icons and line illustrations rely on this.
- Divide. A line separates regions, as a rule between table rows or a rule above a footer does.
- Connect. A line joins two things and shows a relationship, as in an org chart, a flowchart, or a map route.
- Direct. A line has an orientation, and the eye tends to travel along it. Arrows, roads in a photo, and the edge of a table all pull attention in a direction.
- Emphasize. An underline, a box border, or a heavy rule draws attention to what it touches.
- Express. The character of a line, such as smooth, jagged, or wobbly, carries mood. The next chapter covers this in detail.
The same stroke can do several jobs at once. A line under a heading divides the heading from the body, emphasizes the heading, and directs the eye to the text below it.
Lines in the family of elements
Line is the root of several other elements. The diagram shows how the next chapters build on it.
Two of these links matter most for this chapter:
- When a line closes and encloses an area, it becomes the boundary of a shape. Many shapes in a design are really lines that happen to meet.
- When many lines repeat close together, the eye stops seeing separate marks and starts seeing a surface. Hatching in a pen drawing works this way.
Actual lines and the digital model
In print, a line is ink on paper. On screen, a line is data. Vector tools such as Illustrator, Figma, Inkscape, and SVG code describe a line as a path with a stroke. A stroke is the visible outline that follows the path, and it has a width, a color, and other settings. The path itself has no thickness, and the stroke gives it thickness.
This is why a vector line can be scaled without becoming blurry. A raster image (a grid of pixels) stores the line as pixels, and enlarging it exposes the pixel grid.
A small SVG shows the three line jobs that appear most often: outline, divide, and connect.
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="140" viewBox="0 0 320 140">
<!-- Outline: a stroked rectangle with no fill -->
<rect x="10" y="20" width="80" height="60" fill="none" stroke="black" stroke-width="2"/>
<!-- Connect: a line joining two shapes -->
<line x1="90" y1="50" x2="150" y2="50" stroke="black" stroke-width="2"/>
<circle cx="175" cy="50" r="25" fill="none" stroke="black" stroke-width="2"/>
<!-- Divide: a rule across the lower part of the canvas -->
<line x1="10" y1="110" x2="310" y2="110" stroke="#888888" stroke-width="1"/>
</svg>Save this as a .svg file and open it in a browser to see the result. The rectangle and circle use fill="none", so only their strokes show. This is the outline job. The short horizontal line connects the two shapes. The thin gray line at the bottom divides the canvas.
Stroke properties you can control
Even before the next chapter on line qualities, you should know the basic controls that every stroke offers.
| Property | What it controls | SVG attribute |
|---|---|---|
| Width (weight) | How thick the line is | `stroke-width` |
| Color | The hue and brightness of the line | `stroke` |
| Cap | The shape of the ends of an open line | `stroke-linecap` |
| Join | The shape of corners where segments meet | `stroke-linejoin` |
| Dash | A repeating pattern of marks and gaps | `stroke-dasharray` |
Here is a comparison of three horizontal lines with the same direction and length. They differ only in weight, cap, and dash.
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="60">
<line x1="10" y1="10" x2="190" y2="10" stroke="black" stroke-width="1"/>
<line x1="10" y1="30" x2="190" y2="30" stroke="black" stroke-width="6" stroke-linecap="round"/>
<line x1="10" y1="50" x2="190" y2="50" stroke="black" stroke-width="3" stroke-dasharray="8 6"/>
</svg>The top line looks precise and quiet. The middle line looks friendly and firm, because the round caps soften both ends. The bottom line looks like a guide, a fold, or a route, because the gaps tell the eye that the line is a convention and not a physical edge.
Lines that are not drawn as lines
Many lines in a design were never drawn with a line tool. Three common sources:
- Edges. Where two areas of different color meet, the eye sees a line. Photographs are full of these, such as a horizon or the edge of a building.
- Typography. A row of text is a horizontal line made of letters. Stacked lines of text create a pattern of parallel lines, and designers adjust leading (the space between lines) partly to control that pattern.
- Alignment. Several items whose edges sit on the same axis suggest an invisible line along that axis. The next chapters cover this as implied line.
You will use these constantly, even when no stroke is present. A grid of cards with a consistent left edge gives the page a vertical line without drawing one.
Common errors
Intermediate designers tend to make the same handful of mistakes with line:
- Using lines to fix a layout that lacks space. If every group needs a rule around it, the real problem is usually missing spacing. Try adding space between groups first. Lines add visual noise, and each one competes for attention.
- Mixing too many stroke weights without a system. Choose a small set, such as 1, 2, and 4 px, and give each a role. Random weights read as accidents.
- Hairlines that disappear. A 0.25 pt line can vanish in print or on a low-density screen. Choose a minimum weight that your output method will reproduce. Check it at the real size.
- Mismatched cap and join styles. If one icon set uses round caps and the next uses square ends, the set looks assembled from different sources.
- Scaling strokes accidentally. When you resize a shape in some tools, the stroke scales with it, so a 2 px line becomes 4 px. Check whether your tool has an option to scale strokes, and keep it off if you want weights to stay consistent.
- Treating a thick line as free. A heavy stroke adds area. A 12 px border around a 100 px box changes how much of the box remains inside, depending on whether the stroke sits centered on the edge, inside, or outside.
A quick working method
When you look at any design, try this sequence:
- Find the actual lines, meaning the strokes, rules, and borders.
- Find the lines created by edges, text rows, and alignment.
- For each line, name its job from the list of six.
- Ask what would change if you removed it.
If removing a line changes nothing, it is probably decoration. If removing it makes the grouping unclear, it was doing real work. This habit also sets up the critique practice at the end of this tutorial.
Exercise
A designer draws a card with a 1 px gray border and then places a 1 px gray rule inside it between the title and the description. Name the job of each line from the six listed in this chapter, and say what you would try first if the card felt cluttered.
Show answer
The border is an outline: it traces the card's edge and defines its contour. The inner rule divides the title from the description. If the card felt cluttered, try removing the inner rule and increasing the space between the title and description first, because spacing can separate the groups without adding another mark. Keep the border only if the card needs a clear edge against its background.
Exercise
In the SVG <line x1="10" y1="30" x2="190" y2="30" stroke="black" stroke-width="6" stroke-linecap="round"/>, how far past x = 10 and x = 190 does the visible mark extend, and why?
Show answer
It extends 3 units past each end, so the visible mark runs from x = 7 to x = 193. A round cap adds a semicircle at each end with a radius of half the stroke width, and half of 6 is 3.