margin-top किसी तत्व का ऊपरी मार्जिन निर्दिष्ट करता है। इसका मान लंबाई, % या auto में हो सकता है। निम्न कोड चलाकर ऊपरी मार्जिन सेट करें:
उदाहरण
<html>
<head>
</head>
<body>
<p style="margin-top: 10px; border:2px solid red;">
This is a paragraph with a specified top margin
</p>
<p style="margin-top: 10%; border:2px solid green;">
This is another paragraph with a specified top margin in percent
</p>
</body>
</html>