Border styles, color and size : border style « CSS « HTML / CSS






Border styles, color and size

  



<html>
<head>
<title>Border Samples</title>
<style>
body {
  background-color: rgb(50%, 50%, 50%);
  font-size: 1.1em;
  color: yellow;
}

.dotted {
  border-color: yellow;
  border-width: medium;
  border-style: dotted;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.dashed {
  border-color: yellow;
  border-width: medium;
  border-style: dashed;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.solid {
  border-color: yellow;
  border-width: medium;
  border-style: solid;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.double {
  border-color: yellow;
  border-width: medium;
  border-style: double;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.groove {
  border-color: yellow;
  border-width: medium;
  border-style: groove;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.ridge {
  border-color: yellow;
  border-width: medium;
  border-style: ridge;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.inset {
  border-color: yellow;
  border-width: medium;
  border-style: inset;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}

.outset {
  border-color: yellow;
  border-width: medium;
  border-style: outset;
  margin-right: 75%;
  text-align: center;
  margin-left: 10%;
}
</style>
</head>
<body>
<p class="dotted">Dotted</p>

<p class="dashed">Dashed</p>

<p class="solid">Solid</p>

<p class="double">Double</p>

<p class="groove">Groove</p>

<p class="ridge">Ridge</p>

<p class="inset">Inset</p>

<p class="outset">Outset</p>

<hr />
</body>
</html>

   
  








Related examples in the same category

1.The border-style Property
2.'border-style' Example
3.Border style all values
4.border style shorthand with three values
5.border-style: solid dotted;
6.border style shorthand with two values
7.border-style: hidden
8.border-style: dotted
9.border-style: dashed
10.border-style: solid
11.border-style: groove
12.border-style: ridge
13.border-style: inset
14.border-style: outset
15.border-style: none
16.border-style: solid dashed double dotted;
17.border-style: solid dashed dotted;
18.border-style: solid dashed double inset;
19.border-style: solid; border-width: 5px;
20.border-style: double; border-width: medium;
21.All border styles
22.border-style: hidden;
23.border-style: double
24.border-style: none
25.border-style: solid dashed double dotted
26.Various border-styles
27.When no border-color is specified, the border color is the value of the color property.
28.Individual border-style properties can be combined into a single property.
29.Shading border for paragraph
30.Use different border style to highlight