Here we will learn how to use padding properties in our web pages
{padding-left : 20px;}
property value
<!DOCTYPE html>
<html>
<head>
<title>Button</title>
</head>
<body>
<p type="submit" style="padding-left:50px;color:white;background-color:black;">
TDB Tutorials
</p>
</body>
</html>
CSS3 padding property specifies a Shorthand property (all padding properties in one declaration)
<!DOCTYPE html>
<html>
<head>
<style>
.tdb-school{color:rgb(255,255,255);background-color:rgb(0,0,0);
padding:10px 35px 10px 35px;border:none;border-radius:5px}
.top{padding-top:50px}
.right{padding-right:50px}
.bottom{padding-bottom:50px}
.left{padding-left:50px}
</style>
</head>
<!--Body-->
<body>
<button type="submit" class="tdb-school padding">Padding</button><br><br>
<button type="submit" class="tdb-school top">Padding</button><br><br>
<button type="submit" class="tdb-school right">Padding</button><br><br>
<button type="submit" class="tdb-school bottom">Padding</button><br><br>
<button type="submit" class="tdb-school left">Padding</button>
</body>
</html>
{padding : 10px 10px 10px 10px;}
property top right bottom left
<!DOCTYPE html>
<html>
<head>
<style>
.tdb-school{
color:rgb(255,255,255);
background-color:rgb(0,0,0);
padding:50px 50px 50px 50px;
border:none;
border-radius:5px
}
</style>
</head>
<!--Body-->
<body>
<button type="submit" class="tdb-school padding">
Padding
</button><br><br>
</body>
</html>
Share TDB SCHOOL
Share this E-Learning Website on social media platforms with your friends and followers