CSS outline-width property

CSS Outline outline-width Property

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 cannot be negative.
  • thin − An outline thinner than medium.


  • medium − Thicker than thin, thinner than thick.

  • thick − Thicker than medium.

Applies to

All HTML elements.

DOM syntax

object.style.outlineWidth = "thin"; 

Example

This is an 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 the following results –

CSS outline outline-width property

Leave a Reply

Your email address will not be published. Required fields are marked *