# Set border width with CSS

JavascriptWeb DevelopmentFront End Scripts

The border-width property allows you to set the width of element borders. The value of this property could be either a length in px, pt or cm or it should be set to thin, medium or thick.

## Example

You can try to run the following code to set the border width with CSS:

<html>
<head>
</head>
<body>
<p style = "border-width:4px; border-style:solid;">
David Beckham is a legend.
</p>
<p style = "border-width:4pt; border-style:dashed;">
Sachin Tendulkar is a legend.
</p>
</body>
</html>
Published on 17-Apr-2018 09:03:37
Advertisements