ASAmol Shukla
Projects
Courses
Prompts
Skills
Contact
Resume
Course Outline
Syllabus Overview

Complete Digital Marketing Course: From Foundations to Mastery

Courses/Complete Digital Marketing Course: From Foundations to Mastery/Lesson 6: On-Page SEO Optimization
55 mins lesson duration•11 mins read

Lesson 6: On-Page SEO Optimization

Optimize your content, meta tags, headings, and internal links for maximum search visibility.

What is On-Page SEO?

On-page SEO is the practice of optimizing individual web pages to rank higher and earn more relevant traffic. Unlike off-page SEO (which focuses on external signals like backlinks), on-page SEO is entirely within your control.

The On-Page SEO Checklist

Element Best Practice Why It Matters
Title Tag 50-60 characters, include primary keyword First thing users see in search results
Meta Description 150-160 characters, compelling call-to-action Influences click-through rate
H1 Tag One per page, include primary keyword Signals the main topic to Google
URL Structure Short, descriptive, include keyword Helps users and search engines
Header Tags (H2-H6) Organize content logically with keywords Improves readability and SEO
Image Optimization Compressed, descriptive alt text Faster loading, accessibility
Internal Linking Link to relevant pages with descriptive anchor text Distributes authority, helps navigation
Content Quality Comprehensive, accurate, helpful The #1 ranking factor

Mental model: On-page SEO is like writing a book with a clear title, organized chapters, helpful references, and beautiful formatting — it makes both readers (users) and librarians (search engines) happy.

Title Tags: Your First Impression

The title tag is the most important on-page element. It appears in search results as the clickable headline.

Best practices:

  • Keep it under 60 characters (Google truncates after ~60)
  • Put your primary keyword near the beginning
  • Make it compelling and click-worthy
  • Include your brand name if it fits

Examples:

  • ❌ "Home" (too vague)
  • ❌ "Best Running Shoes 2026 - Top Picks for Every Runner - ShoeStore.com" (too long)
  • ✅ "Best Running Shoes 2026: Expert Picks for Every Runner" (clear, compelling)

Meta Descriptions: Your Sales Pitch

Meta descriptions don't directly affect rankings, but they significantly impact click-through rate (CTR), which does affect rankings.

Best practices:

  • 150-160 characters maximum
  • Include your primary keyword naturally
  • Add a call-to-action ("Learn more", "Discover", "Shop now")
  • Make it compelling — you're competing with other results

Header Tags: Content Hierarchy

Tag Usage SEO Impact
H1 Main page title (one per page) High — signals main topic
H2 Major sections Medium — organizes content
H3 Sub-sections within H2s Low-Medium — improves readability
H4-H6 Further subdivisions Minimal — mainly for structure

Header tag best practices:

  • Use keywords naturally in headers
  • Maintain a logical hierarchy (don't skip from H2 to H4)
  • Keep headers descriptive and scannable
  • Each header should introduce a new topic

URL Structure

Good URLs:

  • /best-running-shoes-2026
  • /coffee-shop/seattle
  • /blog/how-to-make-pour-over-coffee

Bad URLs:

  • /page?id=123&cat=456
  • /blog/2026/08/12/post-title-here
  • /category/subcategory/sub-subcategory/product

URL best practices:

  • Keep URLs short and descriptive
  • Include your primary keyword
  • Use hyphens to separate words
  • Avoid unnecessary parameters and session IDs

Image Optimization

Images affect both user experience and SEO:

  1. File size: Compress images without losing quality (use WebP format when possible)
  2. Alt text: Describe the image for accessibility and SEO
  3. File names: Use descriptive names (running-shoes-nike.jpg vs IMG_1234.jpg)
  4. Lazy loading: Load images only when they enter the viewport

Alt text formula: "[Primary keyword] - [descriptive text]"

Example: "Nike Air Zoom Pegasus running shoes - side view on trail"


Common Mistakes to Avoid

  • Mistake: Keyword stuffing in title tags — Fix: Write for humans first, optimize for search engines second.
  • Mistake: Duplicate title tags across pages — Fix: Every page should have a unique title.
  • Mistake: Missing or generic meta descriptions — Fix: Write compelling descriptions for every important page.
  • Mistake: Ignoring image alt text — Fix: Add descriptive alt text to all images.
  • Mistake: Orphan pages (no internal links) — Fix: Every page should be linked from at least one other page.

Professional Tips & Tricks

  • Use Yoast SEO or Rank Math plugins (WordPress) for on-page SEO guidance.
  • Check your title tags in Google Search Console — it shows which pages have issues.
  • Update old content with new keywords and improved optimization quarterly.
  • Use schema markup to enhance your search results with rich snippets.

Key Takeaways

  • On-page SEO is entirely within your control and critical for rankings.
  • Title tags, meta descriptions, and headers are your most important elements.
  • URLs should be short, descriptive, and keyword-rich.
  • Image optimization affects both speed and accessibility.
  • Every page should have unique, optimized elements.

Next up: Technical SEO — site speed, mobile optimization, and crawlability.

Interactive Lesson Code Snippet
# On-Page SEO Audit Checklist

## Title Tag Audit
Page: Homepage
Current: "Welcome to Our Store"
Optimized: "Premium Running Shoes | Free Shipping | ShoeStore.com"
Character count: 49 ✅

## Meta Description Audit
Page: Product Category
Current: (missing)
Optimized: "Shop our collection of premium running shoes. Expert picks for every runner. Free shipping on orders over $50. Shop now!"
Character count: 128 ✅

## Header Tag Structure
H1: Best Running Shoes for Flat Feet (2026)
  H2: Why Arch Support Matters
    H3: Top 5 Picks for Flat Feet
    H3: How to Choose the Right Shoe
  H2: Runner Reviews
  H2: FAQ About Running Shoes

## Internal Linking Plan
- Blog post "How to Choose Running Shoes" → Links to product category
- Product pages → Link to related blog posts
- Homepage → Links to all main categories

## Image Optimization
- All product images: WebP format, < 100KB
- Alt text: Descriptive, keyword-rich
- Lazy loading enabled on all non-critical images
Language: text

Lesson Code (Python)

# On-Page SEO Audit Checklist

## Title Tag Audit
Page: Homepage
Current: "Welcome to Our Store"
Optimized: "Premium Running Shoes | Free Shipping | ShoeStore.com"
Character count: 49 ✅

## Meta Description Audit
Page: Product Category
Current: (missing)
Optimized: "Shop our collection of premium running shoes. Expert picks for every runner. Free shipping on orders over $50. Shop now!"
Character count: 128 ✅

## Header Tag Structure
H1: Best Running Shoes for Flat Feet (2026)
  H2: Why Arch Support Matters
    H3: Top 5 Picks for Flat Feet
    H3: How to Choose the Right Shoe
  H2: Runner Reviews
  H2: FAQ About Running Shoes

## Internal Linking Plan
- Blog post "How to Choose Running Shoes" → Links to product category
- Product pages → Link to related blog posts
- Homepage → Links to all main categories

## Image Optimization
- All product images: WebP format, < 100KB
- Alt text: Descriptive, keyword-rich
- Lazy loading enabled on all non-critical images

Console Output

On-Page SEO Audit Checklist

## Title Tag Audit
Page: Homepage
Current: "Welcome to Our Store"
Optimized: "Premium Running Shoes | Free Shipping | ShoeStore.com"
Character count: 49 ✅

## Meta Description Audit
Page: Product Category
Current: (missing)
Optimized: "Shop our collection of premium running shoes. Expert picks for every runner. Free shipping on orders over $50. Shop now!"
Character count: 128 ✅

## Header Tag Structure
H1: Best Running Shoes for Flat Feet (2026)
  H2: Why Arch Support Matters
    H3: Top 5 Picks for Flat Feet
    H3: How to Choose the Right Shoe
  H2: Runner Reviews
  H2: FAQ About Running Shoes

## Internal Linking Plan
- Blog post "How to Choose Running Shoes" → Links to product category
- Product pages → Link to related blog posts
- Homepage → Links to all main categories

## Image Optimization
- All product images: WebP format, < 100KB
- Alt text: Descriptive, keyword-rich
- Lazy loading enabled on all non-critical images

Code Visualization Tips

  • 🧠Create a visual checklist with checkboxes for each on-page element.
  • 🧠Use browser developer tools to inspect title tags and meta descriptions on any website.
  • 🧠Draw a content hierarchy diagram showing H1 → H2 → H3 relationships.

Professional Tips & Tricks

  • ⚡Use Google's 'site:yourdomain.com' search to see how Google indexes your pages.
  • ⚡Check for duplicate title tags in Google Search Console under 'Enhancements'.
  • ⚡Update your top-performing pages' title tags quarterly to keep them fresh.

Python Code Judge & Practice Arena

LeetCode Style

Run real Python 3.12 WebAssembly code directly in your browser against automated test suites.

Solved:0 / 2
0 / 30 XP
Challenges:
Problem 1 of 2

On-Page SEO Audit

Medium+20 XP
Choose a website and perform a complete on-page SEO audit. Document the title tag, meta description, headers, and image alt text for the homepage.
main.pyPython 3.12 (WASM)
1
2
3
4
5
6
7
8
9
10
11
12
Press Run Code to test or Submit to verify test cases

Course complete

You finished Complete Digital Marketing Course!

Review the full syllabus, revisit any lesson, or explore another course in the Learning Hub.

View full syllabusBrowse all courses
Previous: Keyword Research Mastery
Made withbyAmol Shukla·amolshukla.online
ASAmol Shukla

AI Developer, Trainer & Agentic AI Expert building practical learning systems and real-world AI applications.

Explore

  • Projects
  • Courses
  • Prompts
  • Skills
  • Contact
  • Experience
  • Blogs

Connect

  • Resume
  • Contact
© 2026 Amol Shukla·Created withbyamolshukla.online
Back to top