CSS marker property

Definition and Usage

marker The property points to a marker that will be drawn at all vertices of the element path (i.e., the first, middle, and last vertices).

The shape of the marker is defined by the SVG <marker> element and referenced by the url() value.

CSS marker The value of the property will override any marker property values in SVG.

Example

Example 1

Point to a marker (arrow) that will be drawn at the first, middle, and last vertices of the element path:

#test {
  marker: url(#arrow);
}

Try It Yourself

Example 2

Point to a marker (circle) that will be drawn at the first, middle, and last vertices of the element path:

#test {
  marker: url(#circle);
}

Try It Yourself

CSS Syntax

marker: none|url|initial|inherit;

Property Value

Value Description
none Default value. No markers will be drawn on the path.
url Reference to the URL of a marker defined by an SVG <marker> element.
initial Set this property to its default value. See initial.
inherit Inherit this property from its parent element. See inherit.

Browser Support

The numbers in the table represent the first browser version to fully support this property.

Chrome Edge Firefox Safari Opera
80 80 72 13.1 67

Related Pages

Tutorial:SVG Markups

Reference:CSS marker-start property

Reference:CSS marker-mid property

Reference:CSS marker-end property