+ 4
What <div> tag do?
can anyone send a program using this tag.....And plz also describe the use of this tag...
3 ответов
+ 3
Example:
https://code.sololearn.com/Wby7PqVw36LL/?ref=app
See the sections of this blog. These are the div elements.
+ 2
I am new to the programming and web-design, but i think that <div> is used to make a group, and latter you can change them in CSS. This is one code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<style>
#randomthing {
text-align:center;
color: red
}
</style>
<div id=randomthing>
<h1>Text</h1>
<p>Paragraph</p>
</div>
</body>
</html>
Copy this code here https://code.sololearn.com/#html .
Then remove whole <style></style>. You will see the difference
+ 1
The <div> element is often used as a container for other HTML elements or to divide a page into different sections.