html联系方式页面代码
时间: 2023-08-23 11:07:05 浏览: 85
以下是一个简单的 HTML 联系方式页面的示例代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>Contact Us</title>
<style>
label {
display: block;
margin-bottom: 10px;
}
input[type="text"], textarea {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 16px;
margin-bottom: 20px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<h1>Contact Us</h1>
<form action="submit-form.php" method="post">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="text" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>
```
请注意,这只是一个示例,实际上您需要将 `action` 属性设置为您自己的表单处理脚本的 URL,并根据需要修改样式和表单字段。