W3schools Tutorials & Courses

Learn programming for free with our latest online learning resources with simple examples.

Learn How to Code

<!DOCTYPE html>
<html>
  <head>
    <title>Webpage Title</title>
  </head>
  <body>
    <h1>Main Heading</h1>
    <p>A paragraph text.</p>
  </body>
</html>
body {
  background-color: #FFF; 
  font-size: 16px;
}
h1 {
  font-size: 2rem;
}
p {
  font-family: Verdana,sans-serif;
}
<button onclick="demoFunc()">Click Me!</button>
<script>
  function demoFunc() {
    let p = document.getElementById("p");
    p.textContent = "You changed this text!";
    p.style.fontSize = "20px";
    p.style.color = "blue";
  }
</script>

Express.js

Web Framework

Learn to build fast and scalable server-side applications with Node.js.

const express = require('express');
const app = express();

app.get('/', (req, res) => {
  res.send('Hello Express.js!');
});

app.listen(3000, () => {
  console.log('Server running on port 3000');
});
<?php
echo "Hello, I'm a PHP script!";
function demoFunc()
{
  echo "It works.";
  echo "Today's date is " . date('Y-m-d');
  echo "Have a great day!";
}
demoFunc();
?>
-- Retrieve active users
SELECT userID, 
       CONCAT(firstName, ' ', lastName) AS name, 
       email,
       registrationDate
FROM users
WHERE status = 1;
-- End of query
-- Output: userID, name, email, registrationDate
def greet():
  return '''Welcome to Python!
It's easy to learn.'''

message = greet()
print(message)

Java

Programming Language

Learn to create cross-platform applications and enterprise software.

public class Greet {
  static String greet() {
    return "Welcome to Java!";
  }

  public static void main(String[] args) {
    System.out.println(greet());
    System.out.println("It's easy to learn.");
  }
}

JSP

Web Technology

Learn to build dynamic web content with Java integration.

<%@ page contentType="text/html; charset=UTF-8"%>
<html>
<head>
  <title>Quick JSP Demo</title>
</head>
<body>
  <p>Hello, I'm a JSP script!</p>
  <% out.println("Today's date is " + new java.util.Date()); %>
</body>
</html>
#include<stdio.h>

int main()
{
  printf("First C Program.\n");
  return 0;
}
#include <iostream> 

int main()
{
 std::cout<<"First C++ Program.";
 std::cout<<std::endl<<"Its easy to learn.";
}
{
  "user": {
    "name": "User name",
    "active": true
  }
<user>
  <name>User name</name>
  <active>true</active>
</user>

New & Trending Tutorials

Python Programming

Python Decorators

Learn Python decorators, wrappers, arguments, metadata preservation, stacking, methods, async functions, and common mistakes with practical examples.

CSS3

CSS Grid Layout

Learn CSS Grid Layout with responsive columns, named areas, alignment, implicit tracks, subgrid, and practical examples.

CSS3

CSS Cascade Layers

Learn CSS cascade layers to control stylesheet priority, organize components, isolate vendor CSS, and reduce specificity conflicts.

C Sharp Programming

C# Records

Learn C# records, value equality, with expressions, record classes and structs, shallow immutability, and inheritance with examples.

HTML5

HTML inert Attribute

Learn the HTML inert attribute to disable an entire section, manage focus, and build clearer accessible interfaces with practical examples.

CSS3

CSS Container Style Queries

Learn CSS container style queries to adapt reusable components to custom-property themes and local state with clear, practical examples.

JavaScript

JavaScript Set Methods

Learn JavaScript Set methods to combine, compare, and filter unique values with union, intersection, difference, and practical examples.

MySQL

MySQL EXPLAIN ANALYZE

Learn MySQL EXPLAIN ANALYZE to read actual query plans, compare row estimates, find slow operations, and test focused optimizations.

GIT

Git Interactive Rebase

Learn Git interactive rebase to reorder, edit, squash, split, recover, and safely push rewritten commits.

Docker

Docker Multi-Stage Builds

Learn Docker multi-stage builds to create smaller, safer images with efficient caching, build targets, and protected secrets.

HTTP

HTTP Cache-Control

Learn HTTP Cache-Control to manage freshness, revalidation, private data, shared caches, and efficient content delivery.

PHP 8

PHP Readonly Classes

Learn PHP readonly classes, initialization rules, inheritance, cloning, nested-object limits, and practical immutable designs.

CSS3

CSS @starting-style

Learn CSS @starting-style to create smooth entry and exit transitions for new, hidden, and top-layer elements such as popovers.