Key Ideas
1Headings — h1 to h6. HTML has six heading levels. They create a visual and semantic hierarchy — <h1> is the most important (main title, use once per page), <h6> is the least im...
2Paragraphs & Text Formatting. The <p> tag wraps a paragraph of text. Browsers automatically add space above and below it. For inline text formatting, HTML provides several elements — each wit...
3Block vs Inline Elements. Every HTML element has a default display type. This determines how it sits on the page relative to other elements. There are two main types: block and inline.
4Semantic HTML5 Elements. Before HTML5, developers wrapped everything in <div> tags. HTML5 introduced semantic elements — tags whose names describe their purpose. They look the same as di...
5Special Characters & Entities. Some characters have special meaning in HTML (< > &) — if you type them directly, the browser might interpret them as code. Use HTML entities to display them...