Home  >  Q&A  >  body text

The difference between div and p

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

林大.林大.2213 days ago1666

reply all(1)I'll reply

  • 灭绝师太

    灭绝师太2018-10-23 14:03:05

    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.

    reply
    0
  • Cancelreply