`-webkit-text-stroke` CSS property
The -webkit-text-stroke CSS shorthand property specifies the width and color of strokes for text characters.
The **`-webkit-text-stroke`** [CSS](/docs/Web/CSS) [shorthand](/docs/Web/CSS/Guides/Cascade/Shorthand_properties) property specifies the [width](/docs/Web/CSS/Reference/Values/length) and [color](/docs/Web/CSS/Reference/Values/color_value) of strokes for text characters.
## Constituent properties
This property is a shorthand for the following CSS properties:
- -webkit-text-stroke-color
- -webkit-text-stroke-width
## Syntax
```css
/* Width and color values */
-webkit-text-stroke: 4px navy;
/* Global values */
-webkit-text-stroke: inherit;
-webkit-text-stroke: initial;
-webkit-text-stroke: revert;
-webkit-text-stroke: revert-layer;
-webkit-text-stroke: unset;
```
### Values
This property is specified as two space-separated values:
- <length>
- : The width of the stroke.
- <color>
- : The color of the stroke.
## Formal definition
## Formal syntax
## Examples
### Adding a red text stroke
#### HTML
```html
<p id="example">The stroke of this text is red.</p>
```
#### CSS
```css
#example {
font-size: 3em;
margin: 0;
-webkit-text-stroke: 2px red;
}
```
#### Result
600
## Specifications
## Browser compatibility
## See also
- [Introducing Text-Stroke](https://webkit.org/blog/85/introducing-text-stroke/) on webkit.org (2006)
- [CSS-Tricks article explaining this feature](https://css-tricks.com/adding-stroke-to-web-text/)
- -webkit-text-stroke-width
- -webkit-text-stroke-color
- -webkit-text-fill-color
Cite this
"`-webkit-text-stroke` CSS property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-text-stroke JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy