What is the difference between div and p? One is a paragraph and the other is a region block, right? But after writing it, there doesn’t seem to be much difference when it is displayed on the web page
They are all block-level elements, so there is no change in display. However, the p tag is a paragraph tag. When used to define a large section of text, you can use the attributes of the defined text. Setting the attributes of the applicable text in a div will have no effect.
They are all block-level elements, so there is no change in display. However, the p tag is a paragraph tag. When used to define a large section of text, you can use the attributes of the defined text. Setting the attributes of the applicable text in a div will have no effect.