border in CSS

By Prof. Fazal Rehman Shamil
Last modified on May 27th, 2019

How to put a border in CSS?

There are multiple properties of border. Some of them are;

double:

this is double

dashed:

this is dashed

solid:

this is solid

groove:

this is groove

dotted:

this is dotted

outset:

this is outset

inset:

this is inset

ridge:

this is ridge

hidden:

this is hidden

none:

this is none

Example:

<html>
<head>
<style>
table
{
border-style: dotted;
}
</style>
</head>
<body>
<table border=”2″>
<tr><td>
<p>this is dotted</p>
</td></tr>
</table>
</body>
</html>

Output:

this is dotted

 

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.