
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Set border width with CSS
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>
- Related Articles
- Set the border image width with CSS
- Set the width of image border with CSS
- Set the width of the left border using CSS
- CSS border-image-width
- Set Inset border with CSS
- Set Outset border with CSS
- Change the width of the bottom border with CSS
- How to set border width, border style, and border color in one declaration with JavaScript?
- Animate CSS border-left-width property
- Animate border-top-width CSS property
- The border-width Property in CSS
- Set a border around navbar with CSS
- Set dashed line for border with CSS
- Set dotted line for border with CSS
- Set top-right corner border with CSS

Advertisements