Modern HTML semantics are:
- Use
<p></p>
to contain a paragraph of text in a document.
- Use
<br />
to indicate a line break inside a paragraph (i.e. a new line without the paragraph block margins or padding).
- Use
<div></div>
to contain a piece of application UI that happens to have block layout.
Don't use <div />
or <p />
on its own, those tags are meant to contain content. They appear to work as paragraph breaks only because when the browser sees them, it "helpfully" closes the current block tag before opening the empty one.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…