name: Website
description: Build fast, accessible, and SEO-friendly websites with modern best practices.
metadata: {"clawdbot":{"emoji":"π","os":["linux","darwin","win32"]}}
Website Development Rules
Performance
Images are the #1 cause of slow sites β use WebP/AVIF, lazy-load below-the-fold, and set explicit width/height to prevent layout shift
Render-blocking CSS delays first paint β inline critical CSS in , defer the rest
Third-party scripts (analytics, chat widgets) often add 500ms+ β load them with async or defer, audit regularly
Fonts cause invisible text flash (FOIT) β use font-display: swap and preload critical fonts
Measure with Lighthouse in incognito mode β extensions skew results
Mobile First
Start CSS with mobile styles, add complexity with min-width media queries β easier to scale up than strip down
Touch targets need 44x44px minimum β fingers are imprecise, small buttons frustrate users
Test on real devices, not just browser DevTools β throttling simulation misses real-world jank
Horizontal scroll is a critical bug β test every page at 320px width minimum
viewport meta tag is required:
Accessibility
Every needs alt text β empty alt="" for decorative images, descriptive text for meaningful ones
Color contrast ratio 4.5:1 minimum for body text β use WebAIM contrast checker
Form inputs must have associated elements β placeholders alone are not accessible
Keyboard navigation must work β test every interactive element with Tab key
Screen readers announce heading hierarchy β use H1-H6 in logical order, never skip levels
HTML Structure
One per page only β it's the page title, not a styling tool
Use semantic elements: , , , , β they communicate structure to browsers and assistive tech
for actions, for navigation β don't use divs with click handlers
External links should have rel="noopener" β prevents security vulnerability with target="_blank"
Validate HTML β broken markup causes unpredictable rendering across browsers
CSS Patterns
Avoid !important β it breaks cascade and makes debugging painful. Fix specificity instead
Use relative units (rem, em, %) over fixed px for text β respects user font size preferences
CSS custom properties (variables) reduce repetition β define colors and spacing once, use everywhere
Flexbox for 1D layouts, Grid for 2D β don't force one to do the other's job
Test without CSS loading β content should still be readable in plain HTML
Common Mistakes
Missing favicon causes 404 spam in server logs β always include one, even a simple PNG
Not setting breaks screen reader pronunciation
Hardcoded http:// links break on HTTPS sites β use protocol-relative // or always https://
Assuming JavaScript is available β core content should work without JS (progressive enhancement)