CSS: Formatting border sides individually

This entry is part 23 of 26 in the series Basic CSS

Codecrawl.com-Border
By default, border attributes to all four sides.

We can specify a certain side of the border with special properties.

Here we apply 2 different colors to the top and bottom borders.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Border</title>
    <style>
        p {
            border-style: solid;
            border-top-color: blue;
            border-bottom-color: red;
            border-width: 2px;
        }
    </style>
</head>
<body>

<p>Ushuaia</p>

</body>
</html>

Series Navigation<< CSS: Specifying border width and color
CSS: Setting All Border Attributes At Once >>