HTML & CSS ⚡ Recently updatedUpdated on Jun 30, 2026 — this content may still be evolving.
HTML & CSS: Topics Not to Miss
Check off each topic before your interview.
HTML Fundamentals
- Semantic tags:
header,nav,main,article,section,footer,aside - Heading hierarchy (
h1–h6) — oneh1per page - Forms:
label,inputtypes,textarea,select,button - Form validation attributes:
required,pattern,min,max - Links vs buttons — when to use which
-
alttext on images -
meta viewporttag for responsive -
scriptloading:defervsasync - Data attributes (
data-*)
CSS Fundamentals
- Box model: content, padding, border, margin
-
box-sizing: border-box - Specificity and cascade
- Selectors: element, class, ID, attribute, pseudo-class, pseudo-element
- Inheritance (what inherits, what doesn’t)
- CSS variables (
--custom-property)
Layout
- Flexbox: container + item properties
- CSS Grid:
grid-template-columns,gap,frunit - When Flexbox vs Grid
- Positioning: relative, absolute, fixed, sticky
- Centering techniques (flex, grid, margin auto)
-
z-indexand stacking context
Responsive Design
- Mobile-first media queries
- Common breakpoints (not device-specific — content-based)
- Fluid layouts:
%,fr,max-width -
clamp()for fluid typography - Responsive images:
srcset,sizes
Modern CSS
- Transitions and animations
-
@keyframes - CSS custom properties for theming
-
prefers-color-schemefor dark mode -
prefers-reduced-motionfor accessibility
Accessibility Basics
- Semantic HTML as first accessibility tool
- Keyboard navigation and focus states
- Color contrast (WCAG AA: 4.5:1 for text)
- ARIA when HTML isn’t enough (not as first resort)
- Don’t remove focus outlines without replacement
Performance
- Critical CSS concept
- Font loading:
font-display: swap - Minimize render-blocking CSS
- Avoid expensive properties in animations (use
transform,opacity)
Tools & Practices
- BEM or consistent naming convention
- DevTools: inspect, computed styles, responsive mode
- CSS reset/normalize awareness
- Preprocessors vs native CSS (know the difference)
Self-test: Can you build a responsive navbar + card grid + footer layout in 30 minutes without a framework? If not, do mini-tasks.md first.