0

<p> and <div>

I am lil bit confused, when to use <div> which gives you the same output as <p>

6th Oct 2018, 6:58 PM
Hari Arien
Hari Arien - avatar
2 Respuestas
0
<div> is for dividing an STRUCTURE into small sections. For example, if I'm looking to have a webpage with three sections, I might want to create three different <div>s, each one containing one section. <p> is for dividing a TEXT into small pieces, just like in grammar. So, if I was writing my answer as .HTML, each part of the explanation would be a different <p>. The more complex the website gets, the easier it is to see those differences.
6th Oct 2018, 8:08 PM
Caio Marte
Caio Marte - avatar
0
hey martinho😀, thanks alot
6th Oct 2018, 8:10 PM
Hari Arien
Hari Arien - avatar