YouTube : Sugai Institute
In CSS padding is used to generate space around an element content. It has 4 type of options:
In CSS margin creats space between the edge of your web page and the element. It has 4 type of options:
Note:Watch our video for detailed explanation in Tamil
(Use Ctrl+c to copy this coding)
<html>
<head>
<title>Sugai Institute</title>
</head>
<body>
<div style="border: 3px solid red;margin:50px 10px 20px 50px;">
<h1>Sample CSS margin and padding program</h1>
</div>
<br>
<div style="border: 3px solid green;padding:20px 5px 0px 100px;">
<h1>Sample CSS margin and padding program</h1>
</div>
<body>
</html>
Click output to view the output of the coding
Good
Super akka
Super akka.