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

CSS3

CSS Anchor Positioning

Learn CSS anchor positioning with named anchors, position-area, anchor functions, sizing, fallbacks, and a complete responsive example.

MySQL

MySQL Window Functions

Learn MySQL window functions with OVER, PARTITION BY, ordering, frames, ranking, running totals, LAG, LEAD, and named windows.

JavaScript

JavaScript Intl.Segmenter

Learn JavaScript Intl.Segmenter to split Unicode text into locale-aware graphemes, words, and sentences with practical multilingual examples.

HTML5

HTML Popover API

Learn the HTML Popover API with declarative controls, JavaScript methods, light dismissal, events, styling, and accessibility guidance.

Java Programming

Java Records

Learn Java records, generated members, validation, value equality, defensive copies, interfaces, generic records, and record patterns.

C Sharp Programming

C# LINQ

Learn C# LINQ method and query syntax, filtering, projection, grouping, joins, deferred execution, and provider behavior.

Python Programming

Python Dataclasses

Learn Python dataclasses, generated methods, default factories, validation, frozen and slotted instances, conversion, inheritance, and common mistakes.

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.

GIT

Git Rebase

Learn Git rebase, resolve conflicts, clean commits interactively, push rewritten branches safely, and recover work with reflog.

MySQL

MySQL Indexes

Learn MySQL indexes, composite key order, covering and invisible indexes, and how to verify query performance with EXPLAIN.

CSS3

CSS Cascade Layers

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