Key Ideas
1The Paragraph Element. The <p> element defines a block of text as a paragraph. Browsers automatically add margin above and below each paragraph to separate it visually. It is a block-l...
2HTML Whitespace Rules. HTML collapses all consecutive whitespace (spaces, tabs, newlines) into a single space when rendering. This is called whitespace normalisation — your source formatting...
3Line Breaks & Horizontal Rules. Two simple elements give you control over visual flow without creating new paragraph blocks:
4Inline Text Semantics. Inline elements live inside paragraphs and headings. Unlike block elements, they don't start on a new line — they flow with the surrounding text. Each carries a specif...
5Preformatted Text. The <pre> element preserves whitespace exactly as written in the HTML source — including spaces, tabs, and newlines. It's typically rendered in a monospace font....