Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST TOOLS

New

W3Schools
Adventure App

The W3Schools Adventure app is here! Coding fundamentals as a game. Bite-sized lessons, streaks and XP.
Free on iOS and Android.

Learn more about the app ›
A lesson in the W3Schools Adventure app
The Lynx mascot

Tutorials

What do you want to learn?

Pick a language and start right away. Every tutorial is packed with examples you can run and edit in your browser:

HTML example
<!DOCTYPE html>
<html>
<head>
<title>HTML Tutorial</title>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
Try it Yourself »
CSS example
body {
  background-color: lightblue;
}

h1 {
  color: white;
  text-align: center;
}

p {
  font-family: verdana;
}
Try it Yourself »
JavaScript example
<button onclick="myFunction()">Click Me!</button>

<script>
function myFunction() {
  let x = document.getElementById("demo");
  x.style.fontSize = "25px";
  x.style.color = "red";
}
</script>
Try it Yourself »
Python example
if 5 > 2:
  print("Five is greater than two!")
Try it Yourself »
SQL example
SELECT * FROM Customers
WHERE Country='Mexico';
Try it Yourself »
Java example
public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}
Try it Yourself »
C example
#include <stdio.h>

int main() {
  printf("Hello World!");
  return 0;
}
Try it Yourself »
C++ example
#include <iostream>
using namespace std;

int main() {
  cout << "Hello World!";
  return 0;
}
Try it Yourself »
C# example
using System;

namespace HelloWorld {
  class Program {
    static void Main(string[] args) {
      Console.WriteLine("Hello World!");
    }
  }
}
Try it Yourself »
PHP example
<!DOCTYPE html>
<html>
<body>

<?php
echo "My first PHP script!";
?>

</body>
</html>
Try it Yourself »
React example
import { createRoot } from 'react-dom/client';

function Hello() {
  return (
    <h1>Hello World!</h1>
  );
}

createRoot(document.getElementById('root')).render(<Hello />);
Try it Yourself »

All languages

Free account

Save your progress.
Everywhere.

Learning is free with or without an account. Sign up to keep your XP, streaks and progress, on w3schools.com and in the Adventure app.

Progress tracking XP & streaks Ad-free learning Access to App Challenges Practice problems Leagues Build & host websites
W3Schools Lynx Mascot

Start in one click

Create your free account and pick up where you left off, anywhere.

or

Certificates

Kickstart your career.

Get certified by completing a course. Document your skills with a credential trusted by employers since 1999.

Certified HTML Developer

Issued by W3Schools

Verified credential you can share

my-portfolio.w3spaces.com
<h1>My Portfolio</h1> <p>Built with Spaces.</p> <a href="#">Say hi</a>
Preview

My Portfolio

Built with Spaces.

Say hi

W3Schools Spaces

Build and host websites.

Code directly in your browser, nothing to install. When you are ready, publish your site with one click.

No setup Templates to start from Hosting included

Test your skills

Practice with W3Schools

Exercises, quizzes and a new coding challenge every week.

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.