CSS: Applying border to a paragraph

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

Codecrawl.com-Border
You can apply border style rule to 2-sided tag.

Border style rules are commonly used in paragraphs, headings, lists, and also spans.

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

<p style='border: 1px solid'>Ushuaia</p>

<p style='border: 1px dotted'>Cape Town</p>

<p style='border: 1px dashed'>Pulau Perhentian</p>

<p style='border: 1px double'>Phuket</p>

<p style='border: 1px groove'>Ibiza</p>

<p style='border: 1px ridge'>Bali</p>

<p style='border: 1px inset'>Maldives</p>

<p style='border: 1px outset'>Morocco</p>

</body>
</html>

Series Navigation<< CSS: Using % for indentation and padding
CSS: Specifying border width and color >>