HTML5 & Semantic Elements (<header>, <main>, <article>)
HTML5 (HyperText Markup Language) defines the structural skeleton of every webpage using markup tags. Semantic elements like <header>, <nav>, <main>, and <footer> communicate each section’s meaning to search engines and screen readers.
How It Works & Why It Matters
HTML supplies document structure, CSS controls visual styling, and JavaScript handles interactive behavior.
Every valid HTML5 page starts with <!DOCTYPE html>, includes <meta charset="utf-8"> inside <head>, and places one clear <h1> inside visible content.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>My Project</title> </head> <body> <header><h1>Hello Web</h1></header> <main><img src="photo.jpg" alt="Descriptive alt text"></main> </body> </html>
🏫 Classroom Example
Using <nav> around menu links and alt descriptions on <img> boosts both accessibility scores and SEO.
⚖️ HTML vs. CSS
HTML defines what content is (heading, paragraph, link); CSS defines how it looks (color, spacing, font size).
Forgetting closing tags (</div>, </a>), skipping alt attributes on images, or dumping visible content inside <head>.