CSS Box Model Explained with Examples
CSS box model explained with examples: content, padding, border and margin, content-box vs border-box math, margin collapsing and DevTools tips.
- CSS
- Frontend
- Design
Tutorials on web development and the languages WebFiddle runs, written by Atish Barua. Most examples open in a sandbox with one click.
CSS box model explained with examples: content, padding, border and margin, content-box vs border-box math, margin collapsing and DevTools tips.
Learn JavaScript basics: const and let, functions, the DOM, arrays and objects, with runnable examples and answers to common beginner questions.
Learn CSS basics: selectors, padding and margin, Flexbox alignment, media queries, colors and units, with examples you can edit live.
Learn HTML basics: page structure, common tags, attributes, forms with built-in validation and semantic elements, with examples to try in the browser.
Why useState(expensive()) runs on every render and how passing an initializer function makes React compute initial state only once.
How React's virtual DOM, reconciliation and commit phase update the real DOM, and what Fiber and React 18 concurrent rendering changed.
Reset a React component's state by changing its key instead of syncing props in useEffect, with a runnable example and when not to.
When to use a 301 or 302 redirect, which URL Google shows in search for each, and how 307 and 308 keep POST requests intact.
How WebFiddle runs Node.js-style code in a Web Worker with a process and Buffer shim, and the limits: no require, npm packages or fs.
Practical async/await patterns for Node.js: sequential steps, Promise.all, Promise.allSettled, error handling and top-level await.
How PHP in WebAssembly compares with server-side PHP on latency, privacy, databases and security, and when each one is the right choice.
WebFiddle, Programiz, Google Colab, Replit and Brython compared: where code runs, Python version, packages and best use.
How semantic HTML elements like main, nav and article improve accessibility, and what Google actually says about semantic markup and SEO.
When to use CSS Grid vs Flexbox: one- vs two-dimensional layout, a combined app layout example, and responsive grids with minmax().
A beginner's guide to React Hooks: useState, useEffect, useMemo, useCallback and useRef, the rules of hooks, and when each is worth using.
The 10 ES2015 features used across modern JavaScript: let/const, arrow functions, destructuring, spread, modules, Promises, classes, Map and Set.
Python list comprehension explained: syntax, filtering with if, if else before for, nested loops, dict and set comprehensions, and loop speed.
The headline features of every PHP 8 release from 8.0 to 8.5, with runnable examples you can test across versions in the browser.
How the Node.js event loop works: its six phases, where process.nextTick and promises run, what libuv's thread pool does, and how to avoid blocking.
Why learn TypeScript: static typing, interfaces and safer refactoring, plus real trade-offs such as build steps, erased runtime types and a learning curve.
What WebAssembly is, why it can run faster than JavaScript, real products using it, and why it works with JavaScript rather than replacing it.
Use npm packages in the browser without a bundler, using ES modules, import maps and ESM CDNs like esm.sh, plus what works in WebFiddle.