Web Design for Beginners: Making Beautiful Websites Without Being a Designer - johnverz22/webdev1-lessons GitHub Wiki

1. Color Theory Made Simple

Color Palette Basics

Color Combination Rules

  1. Monochromatic: Different shades of one color

    • Perfect for clean, minimalist designs
    :root {
      --primary-100: #E6F2FF;
      --primary-300: #66B0FF;
      --primary-500: #1E88E5;
      --primary-700: #1976D2;
      --primary-900: #0D47A1;
    }
  2. Complementary Colors: Opposite colors on the color wheel

    :root {
      --primary-blue: #3498db;
      --complement-orange: #e67e22;
    }
  3. Neutral Color Palette

    :root {
      --white: #FFFFFF;
      --light-gray: #F5F5F5;
      --medium-gray: #E0E0E0;
      --dark-gray: #333333;
      --black: #000000;
    }

2. Typography Basics

Font Pairing Guidelines

  • Combine a serif and sans-serif font
  • Use Google Fonts for free, professional fonts
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Merriweather:wght@700&display=swap" rel="stylesheet">
body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
}

h1, h2 {
  font-family: 'Merriweather', serif;
}

Typography Scale

:root {
  --font-xs: 12px;
  --font-sm: 14px;
  --font-base: 16px;
  --font-md: 18px;
  --font-lg: 24px;
  --font-xl: 32px;
  --font-xxl: 48px;
}

body {
  font-size: var(--font-base);
}

h1 { font-size: var(--font-xxl); }
h2 { font-size: var(--font-xl); }

3. Spacing and Layout

The Spacing System

:root {
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.card {
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

4. Responsive Design Basics

Mobile-First Approach

/* Base styles for mobile */
.container {
  width: 100%;
  padding: 16px;
}

/* Tablet and up */
@media (min-width: 768px) {
  .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

5. Complete Starter Template

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Beginner Design Template</title>
    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Merriweather:wght@700&display=swap" rel="stylesheet">
    <style>
        :root {
            /* Color Palette */
            --primary-color: #3498db;
            --secondary-color: #2ecc71;
            --accent-color: #e74c3c;
            
            /* Spacing */
            --space-sm: 8px;
            --space-md: 16px;
            --space-lg: 24px;
            
            /* Typography */
            --font-base: 16px;
            --font-lg: 24px;
            --font-xl: 32px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Open Sans', sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f4f4f4;
        }

        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: var(--space-lg);
        }

        .card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            padding: var(--space-md);
            margin-bottom: var(--space-lg);
        }

        .button {
            display: inline-block;
            background-color: var(--primary-color);
            color: white;
            padding: var(--space-sm) var(--space-md);
            text-decoration: none;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }

        .button:hover {
            background-color: #2980b9;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Welcome to My Website</h1>
        <div class="card">
            <h2>About Me</h2>
            <p>This is a simple, clean design template for beginners.</p>
            <a href="#" class="button">Learn More</a>
        </div>
    </div>
</body>
</html>

Design Principles Checklist

  • Use a limited color palette
  • Maintain consistent spacing
  • Choose complementary fonts
  • Create visual hierarchy
  • Ensure readability
  • Use white space effectively
  • Make it responsive

🚀 Pro Tips

  1. Less is more
  2. Consistency is key
  3. Always check your design on multiple devices
  4. Use online tools and templates
  5. Practice, practice, practice!

Recommended Tools

  • Color Palette: Coolors.co
  • Font Pairing: Google Fonts
  • Design Inspiration: Dribbble
  • Responsive Testing: Responsinator

Learning Resources

⚠️ **GitHub.com Fallback** ⚠️