CSS marker-mid Property
Description
The marker-mid property specifies which marker graphic should be used at the intermediate vertices of a shape or path when styling SVG with CSS. In practice it tells the renderer what marker to draw at each interior corner or joint of elements such as paths, polylines and polygons, so you can decorate every midpoint between segments (for example to place arrowheads, dots, or decorative shapes at each vertex) without touching the SVG markup for each vertex. It is one of the trio of marker properties that let you target the start, interior, and end positions of a stroked geometry.
When used together with its counterparts you can precisely control how a stroked line is annotated: for example, use marker-start to set a shape at the beginning of a subpath, and marker-end to set a shape at the terminal point, while marker-mid deals only with the interior breakpoints between segments. Because marker placement happens after path construction, the visual result depends on the path’s vertices and joins; a single long smooth segment with no explicit interior vertices will not get mid markers, whereas polylines and paths with multiple subpath segments will.
From a design perspective marker-mid is useful for repeating motifs along a line (rail- or chain-like visuals), signaling direction changes in diagrams, or marking intersections. It is applied as a presentation style so you can swap marker graphics or remove them dynamically without changing the SVG structure. Keep in mind that markers are drawn in their own coordinate system and can interact with stroke width, transforms, and path topology, so adjusting stroke, path commands, or marker definitions together yields consistent, predictable decorations.
Definition
- Initial value
- none
- Applies to
- <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> elements in an svg
- Inherited
- yes
- Computed value
- as specified, but with <url> values made absolute
- Animatable
- yes
- JavaScript syntax
- object.style.markerMid
Syntax
marker-mid: none | <url> | <string>;
Values
- none Default value. No marker is drawn in the middle of the path.
- <url>References an SVG <marker> defined elsewhere in the document
- <string>Some legacy implementations allow simple strings like "circle" or "square", but this is mostly deprecated.
Example
Browser Support
The following information will show you the current browser support for the CSS marker-mid property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
