πŸ“– How-To Guides

Web Dev How-To Guides

Step-by-step guides for the CSS techniques, HTML patterns, JavaScript recipes, and SEO setups that come up in every project. Clear, practical, no fluff.

πŸ”
πŸ”Ž No guides matched your search.

CSS Techniques

Modern CSS patterns and layout recipes

πŸ“Œ
How to Make a Sticky Header
Use position: sticky to keep your nav visible on scroll without JavaScript. Includes z-index and backdrop-filter tips.
Read guide β†’
πŸŒ™
How to Add Dark Mode with CSS
Implement dark mode using prefers-color-scheme and CSS custom properties. No JavaScript needed for basic dark mode.
Read guide β†’
βŠ™
How to Center Anything in CSS
Every method for centering elements β€” horizontally, vertically, and both β€” using flexbox, grid, and positioning.
Read guide β†’
↕️
How to Style a Custom Scrollbar
Style the scrollbar with ::-webkit-scrollbar CSS and the scrollbar-color/scrollbar-width standard properties.
Read guide β†’
πŸͺŸ
How to Create a Glassmorphism Effect
Build the frosted glass UI effect using backdrop-filter: blur(), background with transparency, and border styling.
Read guide β†’
🌈
How to Make Gradient Text
Apply a CSS gradient to text using background-clip: text and -webkit-text-fill-color: transparent.
Read guide β†’

JavaScript Patterns

Common JS techniques and browser APIs

πŸ“‹
How to Copy Text to Clipboard
Use navigator.clipboard.writeText() to copy text with a button click. Includes fallback for older browsers.
Read guide β†’
⏱️
How to Debounce a Function
Delay function execution until after a user stops typing. Essential for search inputs and resize event handlers.
Read guide β†’
πŸ’Ύ
How to Use localStorage
Save, read, update, and delete data in the browser's localStorage. Persist user preferences without a backend.
Read guide β†’
🌐
How to Use the Fetch API
Make HTTP GET and POST requests with fetch(). Handle JSON responses, errors, loading states, and async/await.
Read guide β†’
πŸ‘οΈ
How to Use IntersectionObserver
Detect when elements enter the viewport without scroll event listeners. Perfect for lazy loading and scroll animations.
Read guide β†’
πŸŒ“
How to Build a Dark Mode Toggle
Toggle dark mode with a button. Save preference to localStorage and respect prefers-color-scheme on first load.
Read guide β†’

HTML & SEO Setup

Structure, meta tags, and best practices

πŸ—οΈ
How to Write Semantic HTML
Use header, nav, main, article, section, aside, and footer correctly. Semantic HTML improves SEO and accessibility.
Read guide β†’
πŸ”—
How to Add Open Graph Tags
Add og:title, og:description, og:image, and og:url meta tags so your pages look great when shared on social media.
Read guide β†’
🧿
How to Add a Favicon
Add favicons for browsers, mobile home screens, and PWAs. Which sizes you need and the correct link tags.
Read guide β†’
πŸ“Š
How to Add Schema Markup
Add JSON-LD structured data to your HTML pages to enable Google rich results. Step-by-step with examples.
Read guide β†’
πŸ“
How to Use Responsive Images
Use srcset, sizes, and the picture element to serve the right image size on every device and screen resolution.
Read guide β†’
⚑
Web Performance Basics
The highest-impact steps for improving page speed: image optimisation, font loading, critical CSS, and lazy loading.
Read guide β†’

Practical Web Development Guides

Web development tutorials often either go too broad (covering every edge case for completeness) or too shallow (showing the happy path without explaining why). Our how-to guides aim to be the length they need to be β€” long enough to actually solve the problem, short enough to read in 3 minutes.

Who These Guides Are For

These guides are written for working web developers and designers who already know the basics and want to implement specific techniques quickly. Each guide focuses on a single, concrete task with code examples you can copy directly into your project.

Kept Up to Date

We update guides when better approaches become available. For example, the dark mode guide was updated to use the CSS @media prefers-color-scheme approach alongside JavaScript toggles, reflecting how most modern sites implement this feature.