用html语言写一段网页代码:留言表单(包括作者、标题、内容),要求美观漂亮。

用html语言写一段网页代码:留言表单(包括作者、标题、内容),要求美观漂亮。
用户088297720
2023年10月06日
|
浏览 172

我可以帮你编写一个简单的留言表单的HTML代码,如下所示:

复制代码
<!DOCTYPE html>
<html>
<head>
    <title>留言表单</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        form {
            margin-top: 20px;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input[type="text"], textarea {
            width: 300px;
            padding: 5px;
        }
        input[type="submit"] {
            margin-top: 10px;
            padding: 5px 10px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <h1>留言表单</h1>
    <form action="submit.php" method="post">
        <label for="author">作者:</label>
        <input type="text" id="author" name="author" required>
        
        <label for="title">标题:</label>
        <input type="text" id="title" name="title" required>
        
        <label for="content">内容:</label>
        <textarea id="content" name="content" rows="4" required></textarea>
        
        <input type="submit" value="提交留言">
    </form>
</body>
</html>

请注意,这只是一个简单的示例代码,你可以根据自己的需求进行修改和美化。

我要提问
复制内容
分享给好友
AI编程问答网 免责声明:
以上内容除特别注明外均来源于网友提问,AI编程问答网回答,权益归原著者所有;