ब्लॉक-लेवल सेक्शन के लिए <div>
<div> टैग HTML डॉक्यूमेंट का एक सेक्शन डिफाइन करता है। बड़े ब्लॉक-लेवल एलिमेंट्स को ग्रुप करके एक साथ फॉर्मेट करने के लिए उपयोगी है।
उदाहरण: ID सेलेक्टर के साथ
<!DOCTYPE html> <html>
<head>
<title>HTML div Tag</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="container">
<p>Welcome to our website. We provide tutorials on various subjects.</p>
</div>
</body>
</html>
CSS फाइल (style.css)
#container p {
line-height: 15px;
margin: 20px;
padding-bottom: 15px;
text-align: justify;
width: 130px;
color: blue;
}