The basic code of html website can be modified according to the requirements.
仅展示部分html代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Company Website</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
仅展示部分JavaScript(is)代码
document.addEventListener("DOMContentLoaded", function() {
// Button click event to open email client
document.getElementById("contactEmail").addEventListener("click", function() {
window.location.href = "mailto:info@example.com";
});
// Button click event to do something else (if needed)
仅展示部分CSS(styles.css)代码
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
nav ul {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
nav ul li {
display: inline;
margin: 0 10px;
}
button a {
color: #fff;
text-decoration: none;
}
(For the complete code, please click on the resource file.)