#Help
6 messages · Page 1 of 1 (latest)
Thanks for your question :clap:, if someone gives you an answer it would be great if you thanked them with a :white_check_mark: in response. This response will earn you both points for special roles on this server.
The <div> element in HTML is a block-level container element that is used to group other HTML elements together.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Using div Element</title>
<style>
.container {
width: 80%;
margin: 0 auto;
background-color: lightgray;
padding: 20px;
}
.item {
margin-bottom: 10px;
padding: 10px;
background-color: lightblue;
}
</style>
</head>
<body>
<div class="container">
<div class="item">Item 1</div>
<div class="item">Item 2</div>
<div class="item">Item 3</div>
</div>
</body>
</html>
Oh I see now. It's helpful when grouping things
Tysm
You are welcome!