CSS padding-top Property Tutorial

In this section, we will learn what the padding-top property is and how to use it in CSS.

CSS padding-top Property Definition and Usage

The CSS `padding-top` property is used to set the top padding of an element in an HTML document.

CSS padding-top Property Syntax

padding-top: length|auto|initial|inherit;

CSS padding-top Property Value

The value of this property is a number with relative, or absolute units supported in CSS.

Note: you can also use the two global values “initial” and “inherit” for this property.

Example: padding-top in CSS

See the Pen padding-top in CSS by Enjoy Tutorials (@enjoytutorials) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies