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
<html>
<head>
<title>HTML Tutorial</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS Example:
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
}
Try it Yourself
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
}
JavaScript
The language for programming web pages
Learn JavaScriptJavaScript Reference
Get Certified
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>
<script>
function myFunction() {
let x = document.getElementById("demo");
x.style.fontSize = "25px";
x.style.color = "red";
}
</script>
Log in / Sign Up
Create a free account to track your progress, and get access to more features and learning materials.
Code Editor
With our online code editor, you can edit code and view the result in your browser
Try Frontend Editor (HTML/CSS/JS)
Try Backend Editor (Python/PHP/Java/C..)
W3Schools Spaces
If you want to create your own website, check out W3Schools Spaces.
It is free to use, and does not require any setup:
Become a Plus User
And unlock powerful features:
- CheckmarkBrowse W3Schools without ads
- CheckmarkBuild and host Websites
- CheckmarkUnlimited challenges
- CheckmarkUnlimited practice tests
- CheckmarkGet extra credits
- CheckmarkPriority support
For Teachers
Streamline your teaching:
- CheckmarkManage your classroom
- CheckmarkReady-to-use learning materials
- CheckmarkCustomize study plans
- CheckmarkTrack student progress
- CheckmarkInteractive coding challenges