CSS Programming
Free

CSS Padding
Padding property is used to maintain spaces between border and content element.
The padding is affected by the background color of the element.
Syntax :
P { padding-top:20px; padding-right:20px;padding-bottom:20px;padding-left:20px }
Example :
Without padding
<!DOCTYPE html> <html> <head> <style> p { background-color:blue } </style> </head> <body> <p>Webclasses.in</p> </body> </html>
Click On Image For Zoom View

Example : With padding
<!DOCTYPE html> <html> <head> <style> p { background-color:blue; padding-top:30px; padding-right:30px; padding-bottom:30px; padding-left:30px} </style> </head> <body> <p>Webclasses.in</p> </body> </html>
Click On Image For Zoom View

Prev
CSS Outline
Next
CSS Positioning
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. Webclasses tutorials will help the beginner to learn CSS.
Course Features
- Lectures 21
- Quizzes 0
- Duration 50 hours
- Skill level All levels
- Language English
- Students 0
- Certificate No
- Assessments Self