<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 2px solid red; /* Thickness, style, color */
padding: 10px; /* Space inside border */
margin: 15px; /* Space outside border */
}
</style>
</head>
<body>
<div>This is a CSS border example.</div>
</body>
</html>
Explanation:
border: creates a border with thickness, style (solid,dashed,dotted), and color.padding: space inside border.margin: space outside border.
Leave a Reply