Copyright © tutorialspoint.com
border-width is a shorthand property used to set the width of the four border sides of an element.
All the HTML elements.
object.style.borderWidth="2px"; |
Following is the example to show all the border width:
<p style="border-width:4px; border-style:solid;"> This is a solid border whose width is 4px. </p> <p style="border-width:4pt; border-style:solid;"> This is a solid border whose width is 4pt. </p> <p style="border-width:thin; border-style:solid;"> This is a solid border whose width is thin. </p> <p style="border-width:medium; border-style:solid;"> This is a solid border whose width is medium; </p> <p style="border-width:thick; border-style:solid;"> This is a solid border whose width is thick. </p> |
This will produce following result:
This is a solid border whose width is 4px. This is a solid border whose width is 4pt. This is a solid border whose width is thin. This is a solid border whose width is medium; This is a solid border whose width is thick. |
To Become more comfortable - Do Online Practice
Copyright © tutorialspoint.com