JavaScript
The language for programming web pages
Learn JavaScriptJavaScript Reference
Get Certified
W3Schools Spaces
If you want to create your own website, check out W3Schools Spaces.
usa 松任
Learn More
<!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 body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
p {
font-family: verdana;
}
Try it Yourself The language for programming web pages
Learn JavaScript <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 If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]