Thursday, December 27, 2018

CSS margin

HTML and CSS margin:- 


<html>
<head>
<style>
p {
  border: 2px solid blue;
  margin: 30px;
}
</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 margin property defines a margin (space) outside the border.

No comments:

Post a Comment

Internal Javascripts

Internal Javascripts :    The script code can be written directly into the HTML document. script code is placed in header of the docume...