Programming Code Center(PCC)
[CSS]

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

File Name : index.html

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

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

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

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

</body>
</html>

Output :

The padding-right Property

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

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

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