CSS text-stroke-width Property

The text-stroke-width property specifies the width of the stroke.

The text-stroke property is only used with a -webkit- vendor prefix.

Initial Value 0
Applies to All elements.
Inherited Yes.
Animatable No
Version -
DOM Syntax object.style.textStrokeWidth = "thin";


text-stroke-width: length | initial | inheirt;


<!DOCTYPE html>
    <title>Title of the document</title>
      p {
      margin: 0;
      font-size: 4em;
      -webkit-text-stroke-color: #1c87c9;
      .thin {
      -webkit-text-stroke-width: thin;
      .medium {
      -webkit-text-stroke-width: 3.5px;
      .thick {
      -webkit-text-stroke-width: 1.3mm;
    <h2>Text-stroke-width property example</h2>
    <p class="thin">Lorem Ipsum </p>
    <p class="medium">Lorem Ipsum</p>
    <p class="thick">Lorem Ipsum</p>


Value Description
length Specifies the thickness of the stroke.
initial Makes the property use its default value.
inherit Inherits the property from its parents element.

Practice Your Knowledge

Which statement is incorrect about CSS text-stroke-width property.

Related articles