Why do people use div instead to set the "boxes" and edit them without them.? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why do people use div instead to set the "boxes" and edit them without them.?

See my code and understand what i mean (Im not using divs) Html: <!DOCTYPE html> <html> <head> <title> Downloadstuff </title> <link rel="stylesheet" type="text/css" href="index.css"> <meta charset="utf-8"> </head> <body> <header> <ul> <li style="float: right;"> <a href="index.html" target="_blank"> <img src="Logo.jpg" height= "35px" width= "35px" alt="Home"> </a></li> <li > <a href="index.html" target="_blank" > Home </a> </li> <li> <a href="" target="_blank"> Downloads </a></li> <li> <a class="last" href="" target="_blank"> About us </a></li> </ul> <section> <h1> This is a non profit page for the people of the world. The page is created to give u some cool downloads. &#9786; </h1> <p>Maybe there will be an adfly skip button.Thank u for the anderstanding. The Copyright is reserved to respectful owners to the programs. Use it for ​ educational purposes only. </p> </section> </header> <article> <hr> <p> Click this button to go to downloads </p> <a href="" target="_blank"> Downloads </a> <br id="one"> <br> <br> <hr id="second"> </article> <br> <ul> <li> All rights reserved to Drake Applewood.Educational perpouses only. D.Applewood &#9786; </li> </ul> </footer> </body></html> The Importatnt part . CSS: html { overflow: auto; } body { margin:0; overflow: scroll; background-image: url(maxresdefault.jpg); } footer #footer { } header { } header ul { position: fixed; top: 0; right: 0; left: 0; list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: white; } header li { float: left; font-size: xx-large; } header li a { top: 0; display: block; color: #333; text-align: center; padding: 14px 20px; text-decoration: none; } header li a:active{ cursor: wait;

19th Apr 2017, 12:29 PM
Riste Petrov
Riste Petrov - avatar
1 Answer
+ 1
it's like a tradition, i personally prefer to use div's instead of article and i wouldn't say that there is an advantage when you always can use id's or classes
19th Apr 2017, 5:13 PM
Hernán Méndez
Hernán Méndez - avatar