HTML Basics
Idea: HTML = content only. CSS = style only.
Semantic vs Non-semantic
- Semantic tags: <header>, <nav>, <main>, <section>, <article>, <footer>
- Non-semantic: <div> (block), <span> (inline)
- Why semantic? Accessibility, SEO, and code readability.
CSS & Selectors
Links & Paths
- Link: <a href="about.html">About</a>
- Relative: about.html • folder/about.html • ../index.html
- Absolute: https://example.com/folder/about.html
Accessibility (A11y)
- Use semantic structure and labels.
- Images need
alttext. - Good contrast and readable sizes.
- Keyboard friendly navigation.
DOM & Rendering
- Browser gets HTML with HTTP.
- Parse → build DOM tree.
- Load CSS/JS → apply to DOM.
- Render to screen.
Lists • Tables • Figures
Exam Checklist (tick each one)