SEO basics every developer should build in
The technical foundations that let search engines find, understand and show your pages. No tricks, no guarantees, just good struc…
Make one page work on phones, tablets and desktops.
Put this in the <head>. Without it phones pretend to be wide desktops:
<meta name="viewport" content="width=device-width, initial-scale=1">.cards { display: grid; gap: 16px; } /* one column by default */
@media (min-width: 700px) {
.cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
.cards { grid-template-columns: repeat(3, 1fr); }
}Mobile-first (min-width) means small screens load the simple styles and larger screens add more.
Common starting points are 600px, 900px and 1200px. If the layout looks bad at some width, add a breakpoint there. Do not chase specific devices.
@media (prefers-color-scheme: dark) { body { background: #111; color: #eee; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
@media print { nav { display: none; } }Drag the browser window narrower, then use DevTools device mode to check real phone sizes. Also check with your thumb: are buttons big enough to tap?
The technical foundations that let search engines find, understand and show your pages. No tricks, no guarantees, just good struc…
Practical checks that make a site usable by people with low vision, keyboard-only users and screen-reader users. They also help e…