All tags
web
Narrow down
Web45
- TipThe HTML optgroup element puts headings inside a long dropdownGroup the choices of a select so people find theirs faster.1 Dec 2026
- TipAn HTML noindex meta tag keeps one page out of search resultsAsk search engines not to list a thank you page or a draft.1 Dec 2026
- TipAn empty alt in HTML tells screen readers to skip a decorative imageStop screen readers from announcing file names of pictures that mean nothing.1 Dec 2026
- Tip
async function sha256(text) {The Web Crypto API makes a SHA-256 hash right in the browserFingerprint text or a file in the page without adding a library.1 Dec 2026 - Tip
url = URL.createObjectURL(file);URL.createObjectURL previews a chosen photo before any web uploadShow the picked image at once, without sending it to a server first.1 Dec 2026 - Tip
function setFilter(name, value) {History.replaceState keeps web page filters in the address barMake a filtered view shareable without adding a history entry per click.1 Dec 2026 - Tip
const observer = new ResizeObserver((entries) => {ResizeObserver tells you when an element changes size, not only the windowReact to an element's own width changes, from a sidebar toggle or new content.30 Nov 2026 - Tip
URL.parse("not a url"); // nullURL.parse() returns null for a bad URL, so you can drop the try/catchValidate and resolve URLs without exceptions in your normal code path.30 Nov 2026 - Tip
shareButton.addEventListener("click", async () => {Navigator.share() opens the phone's own share sheet from a buttonLet visitors share a page to any app they have installed, with a fallback for desktops.30 Nov 2026 - Tip
if (!name) throw new Error("No name given"); // sync throwPromise.try() turns a sync throw into a rejected promiseHandle errors from functions that might be sync or async in one catch.30 Nov 2026 - Tip
list.addEventListener("click", (event) => {Event.target.closest() makes one click listener handle a whole listOne listener on a parent handles clicks on items that are added later.30 Nov 2026 - Tip
const regions = new Intl.DisplayNames(["nl"], { type: "region" });Intl.DisplayNames gives country, language and currency names in any languageTurn codes like DE or EUR into readable names without a translation file.30 Nov 2026 - Tip
// 1st 2nd 3rd 4th 11th 12th 21st 22ndIntl.PluralRules picks 1 file or 2 files, and 1st, 2nd and 3rdChoose the right plural or ordinal suffix for a number without if statements.30 Nov 2026 - Tip
const collator = new Intl.Collator("en", { numeric: true, sensitivity: "base" });Intl.Collator with numeric: true sorts img2 before img10Natural sort order for file names and versions, ignoring upper and lower case.30 Nov 2026 - Tip
const signal = AbortSignal.any([AbortSignal.any() stops a fetch on a timeout or a cancel button, whichever comes firstCombine several abort reasons into one signal for fetch or any other API.30 Nov 2026 - Tip
function* naturals() {Iterator helpers like filter() and take() work on generators without making an arrayMap, filter and limit any iterator lazily, even an endless one.30 Nov 2026 - Tip
// Map { "jpg" => ["a.jpg", "c.jpg"], "png" => ["b.png"] }Map.getOrInsert() reads a key or stores a default in one callGroup or count items in a Map without the has, set, get dance.30 Nov 2026 - Tip
delete item.dataset.status; // removes the attributeElement.dataset reads data-* attributes as camelCase propertiesStore small bits of state in the markup and read them without getAttribute.30 Nov 2026 - Tip
const observer = new MutationObserver((mutations) => {MutationObserver runs your code when other scripts change the pageDetect added, removed or changed elements without polling the DOM.30 Nov 2026 - Tip
// submit when the user presses Ctrl+Enter in the textareaForm.requestSubmit() submits from a script and still runs validationScript-triggered submits check required fields and fire the submit event, unlike submit().30 Nov 2026 - Tip
const start = Temporal.PlainDate.from("2026-01-31");Temporal.PlainDate does date math without the time zone bugs of DateAdd months and count days between calendar dates, without midnight and DST surprises.30 Nov 2026 - Tip
let lock = null;Navigator.wakeLock keeps the screen on for a recipe or a timerStop a phone from dimming while someone follows steps on your page.30 Nov 2026 - Tip
const text = "👍🏽 ok 🇳🇱";Intl.Segmenter counts characters the way people see them, emoji includedGet a real character count for limits and truncation, where string length is wrong.30 Nov 2026 - Tip
const dark = window.matchMedia("(prefers-color-scheme: dark)");MatchMedia() with a change listener follows dark mode while the page is openReact in a script when the visitor switches between light and dark mode.30 Nov 2026 - Tip
const query = "1.5 (beta)?";RegExp.escape() makes user input safe to put inside a regular expressionSearch for literal text such as 1.5 (beta)? without the dots and brackets acting as regex syntax.30 Nov 2026 - Tip
new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(123456.789);JavaScript's Intl.NumberFormat formats euros and big numbers the local wayFormats prices and large numbers per language and currency, without your own string code.26 Nov 2026 - Tip
const observer = new IntersectionObserver((entries) => {JavaScript's IntersectionObserver tells you when an element scrolls into viewRuns code when an element enters the viewport, without listening to every scroll event.26 Nov 2026 - Tip<link rel="preconnect"> in your HTML warms up the connection to another site earlyLets the browser set up the connection to a critical third-party server before it is needed.26 Nov 2026
- TipThe HTML <template> element holds markup that a script copies for each itemKeeps a block of HTML ready but hidden, so a script can copy it for each new item.26 Nov 2026
- Tip
[5, 12, 50, 130, 44].findLast((element) => element > 45);JavaScript's findLast() searches an array from the endFinds the last array item that matches a test, without reversing or copying the array.26 Nov 2026 - TipFetchpriority="high" in your HTML makes the browser load the hero image firstTells the browser which image matters most, so the main picture of a page appears sooner.26 Nov 2026
- Tip
...the page behind the drawer...The inert attribute switches off a whole part of a pageMakes part of a page unclickable, unfocusable and hidden from screen readers with one attribute.25 Nov 2026 - Tip
inputmode="numeric" autocomplete="one-time-code">Autocomplete="one-time-code" lets browsers fill in SMS verification codesMarks an input as a one-time code field so browsers can offer the code from a text message.25 Nov 2026 - TipThe HTML datalist element adds autocomplete suggestions to an inputGives a text input a list of suggested values without JavaScript, while still allowing free typing.25 Nov 2026
- TipThe HTML inputmode attribute picks the right keyboard on phonesHints which virtual keyboard a phone should show for a field, without changing validation.25 Nov 2026
- TipThe HTML picture element serves other formats and crops per screenOffers the browser alternative image files by format or by media condition, with an img fallback.25 Nov 2026
- Tip
const rtf = new Intl.RelativeTimeFormat("nl", { numeric: "auto" });Intl.RelativeTimeFormat writes "3 days ago" in any languageFormats a number and a unit as relative time in a chosen language, without a library.25 Nov 2026 - Tip
button.addEventListener("click", async () => {Navigator.clipboard.writeText copies text, with rules about when it mayWrites a string to the clipboard from JavaScript, as long as the page and the moment are allowed.25 Nov 2026 - Tip
const results = await Promise.allSettled([Promise.allSettled waits for every promise, even the ones that failRuns several promises together and returns the outcome of each, without stopping at the first rejection.25 Nov 2026 - Tip
const params = new URLSearchParams({ q: "fiets reparatie", page: 2 });URLSearchParams builds and reads query strings without manual escapingParses and builds URL query strings, with encoding handled for you.25 Nov 2026 - Tip
Delete this item?The dialog element gives you a modal without a libraryOpens a real modal dialog with a backdrop, focus handling and Escape to close, using one HTML element.24 Nov 2026 - Tip
const items = ['a', 'b', 'c'];Array.at(-1) gets the last item without array.length – 1Reads an array item by index and counts from the end when the index is negative.24 Nov 2026 - Tip
const id = crypto.randomUUID();Crypto.randomUUID() creates a random ID without a packageReturns a random version 4 UUID from the browser's secure random generator.24 Nov 2026 - Tip
const files = [Object.groupBy() sorts an array into groups by a keyGroups the items of an array into an object, one array per key you compute.24 Nov 2026 - Tip
try {AbortSignal.timeout() gives fetch a timeout in one lineMakes a fetch request give up after a set number of milliseconds, without a controller and a timer.24 Nov 2026
CSS9
- Tip
@supports (display: grid) {CSS @supports applies styles only when the browser understands themWraps CSS in a feature check, so newer features get a fallback in browsers that lack them.26 Nov 2026 - Tip
input:user-invalid {CSS :user-invalid shows form errors only after the visitor has typed somethingMarks invalid form fields red only after interaction, not on an empty form that just loaded.26 Nov 2026 - Tip
object-fit: cover;CSS object-fit: cover makes images fill a box without stretchingMakes an image fill a fixed-size box, cropping the edges instead of distorting it.26 Nov 2026 - TipThe HTML popover attribute gives you a dropdown with zero JavaScriptMakes a menu or tooltip that opens and closes from a button, without writing JavaScript.26 Nov 2026
- Tip
.header {CSS backdrop-filter blurs whatever is behind an elementApplies effects such as blur to the area behind an element, for frosted glass headers and overlays.25 Nov 2026 - Tip
.card { position: relative; }CSS inset replaces top, right, bottom and left in one lineSets top, right, bottom and left of a positioned element with one shorthand property.25 Nov 2026 - Tip
place-items: center;CSS place-items: center centers content on both axes in a gridCenters items horizontally and vertically with one declaration on a grid container.25 Nov 2026 - Tip
a {CSS text-underline-offset moves an underline away from the textControls the distance between text and its underline, so links stop cutting through descenders.25 Nov 2026 - Tip
color-scheme: light dark;Color-scheme: light dark gives form controls and scrollbars a dark modeTells the browser your page supports light and dark, so default controls match the visitor's setting.23 Nov 2026
Network2
- Tip
Referrer-Policy: strict-origin-when-cross-originReferrer-Policy decides how much of your URL other sites seeControls whether the browser sends the Referer header, and how much of the address it contains.3 Dec 2026 - Tip
curl.exe -I https://example.comType curl.exe in Windows PowerShell 5.1 to get the real toolAvoid the alias that turns curl into Invoke-WebRequest and breaks copied commands.30 Nov 2026
Media2
- Tip
width="640" height="360" poster="demo.jpg">HTML video needs muted and playsinline to autoplay nicely on phonesMake a short silent clip start by itself without taking over the screen.1 Dec 2026 - Tip
const stream = new Blob([text]).stream()CompressionStream gzips data in the browser without a libraryCompress a large JSON export or upload with a built-in stream.30 Nov 2026
Other tips1
Home Assistant1
Nothing matches.