Creating Premium Web Pages
HTML<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Premium Landing Page</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', -apple-system, sans-serif; line-height: 1.6; } .hero { min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; text-align: center; padding: 2rem; } .hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1rem; } .cta-btn { display: inline-block; padding: 1rem 2rem; background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3); border-radius: 50px; color: white; text-decoration: none; font-weight: 600; backdrop-filter: blur(10px); transition: all 0.3s ease; } .cta-btn:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); } </style> </head> <body> <section class="hero"> <div> <h1>Beautiful Design Starts Here</h1> <p>Crafting premium web experiences that convert</p> <a href="#" class="cta-btn">Get Started</a> </div> </section> </body> </html>
Progress:
- Understand Requirements - Purpose, target audience, content needs
- Choose Design Direction - Color scheme, typography, layout style
- Structure HTML - Semantic elements, proper hierarchy, accessibility
- Create CSS Foundation - Reset, variables, typography, grid system
- Build Sections - Header, hero, features, footer in order
- Add Responsive Design - Mobile-first approach, breakpoints
- Implement Interactions - Hover effects, animations, micro-interactions
- Polish & Optimize - Cross-browser testing, performance, accessibility
CSS Organization Pattern
CSS/* 1. CSS Reset & Variables */ /* 2. Typography & Base Styles */ /* 3. Layout Components */ /* 4. Section Styles */ /* 5. Interactive Elements */ /* 6. Responsive Breakpoints */
Example 1: SaaS Landing Page Input: "Create a landing page for a project management tool" Output: Clean hero with gradient background, feature cards with icons, pricing table, testimonials, and sticky navigation with glassmorphism effect.
Example 2: Portfolio Site Input: "Designer portfolio with dark theme" Output: Full-screen image gallery, smooth scroll animations, project hover overlays, contact form with floating labels, and cursor-following effects.
Example 3: Restaurant Website Input: "Modern restaurant site with menu" Output: Video hero background, menu cards with food photography, reservation form, Google Maps integration, and warm color palette.
Design Fundamentals:
- Use 8px grid system for consistent spacing
- Stick to 2-3 font weights maximum
- Implement proper visual hierarchy (h1: 48px+, h2: 36px+, body: 16-18px)
- Maintain 4.5:1 contrast ratio minimum for accessibility
CSS Architecture:
- Use CSS custom properties for colors and spacing
- Mobile-first responsive design (min-width breakpoints)
- Prefer Flexbox for 1D layouts, Grid for 2D layouts
- Use clamp() for fluid typography:
font-size: clamp(1rem, 4vw, 2rem)
Performance:
- Optimize images with proper formats (WebP with fallbacks)
- Use transform and opacity for animations (GPU acceleration)
- Minimize reflows with CSS containment
- Preload critical fonts with
font-display: swap
Interactive Elements:
CSS.button { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform: translateZ(0); /* Enable GPU acceleration */ } .button:hover { transform: translateY(-2px); }
Design Issues:
- Don't use more than 3 font families
- Avoid pure black (#000) - use dark grays (#1a1a1a)
- Don't center large blocks of text
- Avoid auto margins on flex items (use justify-content instead)
CSS Problems:
- Don't use fixed heights - use min-height
- Avoid !important (restructure specificity instead)
- Don't set width: 100% on block elements unnecessarily
- Don't use px for font-size in media queries (use em/rem)
Responsive Mistakes:
- Don't design desktop-first
- Avoid horizontal scrolling on mobile
- Don't use viewport units (vh/vw) without fallbacks for mobile browsers
- Don't forget touch targets (minimum 44px clickable area)
Accessibility Oversights:
- Missing focus states for keyboard navigation
- Low contrast ratios
- Images without alt text
- Forms without proper labels