HTML and CSS padding:-
<html>
<head>
<style>
p {
border: 2px solid blue;
padding: 20px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
<html>
<head>
<style>
p {
border: 2px solid blue;
padding: 20px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
OUTPUT:-
- The CSS padding property defines a padding (space) between the text and the border.
No comments:
Post a Comment