Learn to Code

Free, step-by-step tutorials for HTML, CSS, JavaScript, Python, Java, Spring Boot, React, Angular, SQL and DSA, with live animations and games.

Create a free account to unlock:

  • Progress tracking
  • XP & daily streaks
  • Live DSA visualizer
  • 2-minute brain games
  • Interview problems
  • Try-it code editor

Create free account

Not sure where to begin? Start with HTML Introduction ❯

⚡ 0

Keep learning. Keep leveling up.

Level 1
XP this week0
0Day streak

Tired? Take a 2-minute brain break

Binary Hunt, Bracket Blitz, Big-O Snap, Tower of Hanoi… tiny games that secretly teach algorithms.

Play a game ❯

Watch algorithms move

Every DSA pattern comes with a live, step-by-step animation you can play, pause and replay with your own input.

Start DSA ❯
Sign in
🔥 Daily challenge Saturday, 24 October · Spring · +15 XP
1Where should database passwords live?

Learn it: Spring Properties, @Value, @ConfigurationProperties and Profiles ❯

Top learners this week

  1. The week just started. Answer today's challenge and be first!
See the full leaderboard ❯

HTML Example

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>

CSS Example

<!DOCTYPE html>
<html>
<head>
<style>
  body { font-family: sans-serif; }
  h1 { color: #0a7d4f; text-align: center; }
  p { background: #e3f3eb; padding: 12px; }
</style>
</head>
<body>

<h1>Styled with CSS</h1>
<p>Change the colours and press Run.</p>

</body>
</html>

JavaScript Example

const name = 'VitalStack';

for (let i = 1; i <= 3; i++) {
  console.log('Lesson ' + i + ' on ' + name);
}

SQL Example

SELECT name, city
FROM customers
WHERE country = 'India'
ORDER BY name;

Python Example

name = "VitalStack"

for i in range(1, 4):
    print(f"Lesson {i} on {name}")

JavaScript Example

// Call a REST API and read JSON
fetch('https://jsonplaceholder.typicode.com/users/1')
  .then(res => res.json())
  .then(user => console.log(user.name));

DSA

Data structures and algorithms, one pattern at a time, with live animations you can play, pause and replay.

  1. 1 DSA Introduction
  2. 2 Big O Notation
  3. 3 Arrays and Strings
  4. 4 Hashing
  5. 5 Two Pointers
  6. 6 Sliding Window
  7. +23 more lessons

Interview Problems

Classic coding interview problems solved step by step: brute force first, then the optimal pattern, in Python.

  1. 1 Two Sum
  2. 2 Contains Duplicate
  3. 3 Valid Anagram
  4. 4 Group Anagrams
  5. 5 Top K Frequent Elements
  6. 6 Product of Array Except Self
  7. +45 more lessons

AI Guides

Understand AI tools, agents and prompts, and use them well.

Browse all guides ❯

Code Editor

Edit code and see the result instantly, right in your browser. Every HTML and JavaScript example in our tutorials has a “Try it Yourself” button.