Border Introduction

Description

The three key properties for basic borders are border-width, border-style, and border-color.

  • border-width - Sets the width of the border.
  • border-style - Sets the style used to draw the border.
  • border-color - Sets the color of the border. Value: color.

Example

The following code defines a Basic Border.


<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
p {<!--  ww  w . j a  va 2s  . c om-->
  border-width: 5px;
  border-style: solid;
  border-color: black;
}
</style>
</head>
<body>
  <p>This is a test.</p>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table