HTML Element Style How to - Change hr border








Question

We would like to know how to change hr border.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
hr {<!--   www . ja v  a2  s.  c  o m-->
  border-top: 1px solid red;
  border-bottom: 1px solid blue;
}
</style>
</head>
<body>
  <hr>
</body>
</html>

The code above is rendered as follows: