Definition:
CSS margin-left applies space outside the defined left border.
Syntax:
margin-left: 10px;
Source Code:
<!DOCTYPE html>
<html>
<head>
<style>
.paragraph{
border: 2px dashed red;
background-color: pink;
text-align:center;
margin-left: 10px;
}
</style>
</head>
<body>
<div class="paragraph">Left Margin is 10px; </div>
</body>
</html>
Output:
Donate to support writers
You may be interested in the following topics:
- CSS margin:collapse;
- CSS margin:inherit;
- CSS Margin: auto;
- CSS margin-left
- CSS margin-bottom
- CSS margin-right
- CSS Margin-top
- CSS Margin
- CSS Margin (All Properties)