what is the difference between
and
?
what is the difference between
?
div is the simplest building block of the html page.
p is the dedicated html tag for the paragraph section in the page.
you can also use div for paragraph section, but p here comes with some predefined attributes like padding margin etc to maintain the consistency.