Hisia ya marker

Definition and usage

marker The attribute 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 attribute will override any value of the marker attribute 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;

Attribute value

Value Description
none Default value. No markers will be drawn on the path.
url The URL reference for the marker defined by the 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 indicate the browser version that first fully supports this property.

Chrome Edge Firefox Safari Opera
80 80 72 13.1 67

Vipindi vya huzuni

Mafunzo:Taji ya SVG

Tunakita:Hisia ya marker-start

Tunakita:Hisia ya marker-mid

Tunakita:Hisia ya marker-end