width: ***; height: ***;

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O

The width property specifies the width of an element, and the height property specifies the height of an element.

The size of the horizontal rule can be specified by applying these properties to the HR element.


hr {
width: 80%;
height: 10px;
}

Property Value Explanation
width length or % the size of the width
height length or % the size of the thickness (height)

Example


<html>
<head>
<title>TAG index</title>

<style type="text/css">

hr {
width: 80%;
height: 10px;
}

</style>

</head>
<body>

<hr>

</body>
</html>

Output