CSS - outline-width


Advertisements


Description

The outline-width property defines the width of the outline around an element.

Possible Values

  • length − Any length unit. Length units for this property may not be negative.

  • thin − An outline which is thinner than an outline set to medium.

  • medium − An outline which is thicker than an outline set to thin, and thinner than an outline set to thick.

  • thick − An outline which is thicker than an outline set to medium.

Applies to

All the HTML elements.

DOM Syntax

object.style.outlineWidth = "thin";

Example

Here is the example −

<html>
   <head>
   </head>
   
   <body>
      <p style="outline-width:thin; outline-style:solid;">
      This text is having thin outline.
      </p>
      <br />
      
      <p style="outline-width:thick; outline-style:solid;">
      This text is having thick outline.
      </p>
      <br />
      
      <p style="outline-width:5px; outline-style:solid;">
      This text is having 5x outline.
      </p>
   </body>
   
</html> 

This will produce following result −



Advertisements