Programming Code Center(PCC)
[CSS]

(PCC)::[How-to-Set-padding-top-of-an-element]::[css]

File Name : index.html

<!DOCTYPE html>
<html>
<head>
<style>
p.padding {
  padding-top: 2cm;
}

p.padding2 {
  padding-top: 50%;
}
</style>
</head>
<body>

<h1>The padding-top Property</h1>

<p>This is a text with no top padding. This is a text with no top padding. This is a text with no top padding.</p>
<p class="padding">This text has a top padding of 2 cm. This text has a top padding of 2 cm. This text has a top padding of 2 cm.</p>
<p class="padding2">This text has a top padding of 50%. This text has a top padding of 50%. This text has a top padding of 50%.</p>

</body>
</html>

Output :

The padding-top Property

This is a text with no top padding. This is a text with no top padding. This is a text with no top padding.

This text has a top padding of 2 cm. This text has a top padding of 2 cm. This text has a top padding of 2 cm.

This text has a top padding of 50%. This text has a top padding of 50%. This text has a top padding of 50%.