CSS text-stroke

This CSS property adds a stroke to the text and also provides decoration options for them. It defines the color and width of strokes for text characters.

This CSS property is the shorthand of the following two properties:

text-stroke-width: It describes the thickness of the stroke effect and takes the unit value.

text-stroke-color: It takes the value of a color.

The text-stroke can only be used with the -webkit- prefix.

Example

Test it Now

Let's see another example of the CSS text-stroke property.

Example2

In this example, we are using -webkit-text-fill-color, which specifies the fill color of the characters of text. Instead of this property, we can use the color property. Similar to the color property, the -webkit-text-fill-color fills the foreground color of the text content of an element.

Test it Now

Next TopicCSS Zoom




Contact US

Email:[email protected]

CSS text-stroke
10/30