Complete Reference with Copy-Paste Examples
Part of The Direct Path to Linux Ubuntu
— free for all students and developers.
Every website starts with HTML and CSS. Understanding the DOM, semantic structure, and layout is fundamental to all web development.
CSS Grid and Flexbox enable layouts that work on any screen size — from a 320px phone to a 4K monitor — without JavaScript.
Semantic HTML elements like <nav>, <main>, <article> and ARIA attributes make websites usable for everyone.
CSS custom properties, animations, clamp(), and container queries make CSS more powerful than ever — no preprocessor needed.
Run a HTML program:
# Save as .html and open in browser # Or serve locally: python3 -m http.server 8000 # serve current directory npx serve . # Node.js static server npx live-server . # auto-reload dev server # Validate HTML: npx html-validate index.html # Check CSS: npx stylelint style.css