0
<p> and <div>
I am lil bit confused, when to use <div> which gives you the same output as <p>
2 Respostas
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.
0
hey martinho😀, thanks alot