CSS: Specifying border width and color

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

By default a border is black and 4 pixels wide.

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

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>

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

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



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