What are the key programming component of a basic web page? Give one example for each of them.
时间: 2024-05-22 20:14:15 浏览: 68
The key programming components of a basic web page are HTML, CSS, and JavaScript.
An example of HTML would be the
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a basic example of an HTML web page.</p>
</body>
</html>
An example of CSS would be:
body {
background-color: lightblue;
}
An example of JavaScript would be:
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World!";
}
阅读全文