Quick Intro
- HTML, the web's markup language, uses elements and attributes.
- Elements are void or empty (no content or children), non-replaced, or replaced (by objects).
- Attributes define element properties.
- Case-Insensitive for names but not values,
- global, (i18n), generic (
data-*), and event types.
- Whitespace outside tags are collapsed into 1.
- Entitites display special characters. e.g.
&
HTML5 building blocks:
- Semantics: Tags like
<section>, <article> for meaningful structure.
- Web APIs: Real-time APIs (e.g. WebSockets).
- Offline/Storage:
localStorage, IndexedDB.
- Multimedia & Graphics:
<audio>, <video> <canvas>.
- Device Access: getUserMedia for hardware.
data- attributes
- Store metadata directly on elements
- Access via
element.dataset in JS
- Useful for UI behavior, plugins, scripts
- Keeps markup clean and semantic
Document Structure & Metadata
<!doctype html>: document type is HTML5. It's a null element [ no closing tag]
<html lang='en'>: root element