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.


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

      <p style = "border-width:4px; border-style:solid;">
         David Beckham is a legend.
      <p style = "border-width:4pt; border-style:dashed;">
         Sachin Tendulkar is a legend.
Updated on 03-Feb-2020 06:21:34