CSS: Specifying border width and color

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

Codecrawl.com-Border
By default a border is black and 4 pixels wide.

To change the color and width, we use the following highlighted line.

<!DOCTYPE html>
<html>
<head lang='en'>     
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Border</title>
</head>
<body>

<p style='border: 5px solid purple; padding: 5px'>Ushuaia</p>

<p style='border: solid'>Default</p>

</body>
</html>

 

Series Navigation<< CSS: Applying border to a paragraph
CSS: Formatting border sides individually >>