border

JavaScript syntax:

border

Values:

 
[ <border-width> || <border-style> || <border-color> ] | inherit
  

Initial value:

Initial value from individual properties.

Applies to:

All elements.

Inherited:

No.

Description:

border is a shorthand property that defines the width, color, and style of a border.

Examples:

 
<html>
<head>
<style>
.style1 {
  border: 3px solid blue;
  font-family: verdana;
  font-weight: bold
}

.style2 {
  border: "none";
  font-family: verdana;
  font-weight: bold
}
</style>
</head>
<body>
  <div id="myL" style="width: 230; height: 100; background-color: beige"
    onmouseover="this.className='style1'"
    onmouseout="this.className='style2'">This is a div element.</div>
</body>
</html>
  
Click here to view the demo
Home 
  HTML CSS Book 
    CSS Reference  

Property:
  1. background
  2. background-attachment
  3. background-color
  4. background-image
  5. background-position
  6. background-repeat
  7. border
  8. border-bottom
  9. border-bottom-color
  10. border-bottom-style
  11. border-bottom-width
  12. border-color
  13. border-left
  14. border-left-color
  15. border-left-style
  16. border-left-width
  17. border-right
  18. border-right-color
  19. border-right-style
  20. border-right-width
  21. border-style
  22. border-top
  23. border-top-color
  24. border-top-style
  25. border-top-width
  26. border-width
  27. bottom
  28. clear
  29. clip
  30. color
  31. content
  32. counter-increment
  33. counter-reset
  34. cursor
  35. direction
  36. display
  37. float
  38. font
  39. font-family
  40. font-size
  41. font-style
  42. font-variant
  43. font-weight
  44. height
  45. left
  46. letter-spacing
  47. line-height
  48. list-style
  49. list-style-image
  50. list-style-position
  51. list-style-type
  52. margin
  53. margin-bottom
  54. margin-left
  55. margin-right
  56. margin-top
  57. max-height
  58. max-width
  59. min-height
  60. min-width
  61. outline
  62. outline-color
  63. outline-style
  64. outline-width
  65. overflow
  66. padding
  67. padding-bottom
  68. padding-left
  69. padding-right
  70. padding-top
  71. position
  72. quotes
  73. right
  74. text-align
  75. text-decoration
  76. text-indent
  77. text-transform
  78. top
  79. unicode-bidi
  80. vertical-align
  81. visibility
  82. white-space
  83. width
  84. word-spacing
  85. z-index
Related: