Skip to content

Commit a67af57

Browse files
Created email form
1 parent e05d33c commit a67af57

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

html-forms/index.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313
</head>
1414

1515
<body>
16-
<main></main>
16+
<main>
17+
<form id="emailForm" onsubmit="return alert('Email sent');">
18+
<label for="name">Name:</label>
19+
<input id="name" type="text" name="name" />
20+
<label for="email">Email:</label>
21+
<input id="email" type="text" name="email" />
22+
<label for="message">Your message:</label>
23+
<textarea id="message" name="message" rows="10"></textarea>
24+
<button type="submit">Submit</button>
25+
</form>
26+
</main>
1727
</body>
1828
</html>

html-forms/style.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
body {
22
padding: 10px;
3+
width: 800px;
4+
margin: auto;
35
}
46

57
input {
6-
margin: 5px;
8+
margin-bottom: 30px;
79
}
10+
11+
form {
12+
display: flex;
13+
flex-direction: column;
14+
}
15+
16+
.button-wrapper {
17+
display: flex;
18+
flex-direction: row;
19+
}
20+
21+
form button {
22+
margin-top: 30px;
23+
background-color: white;
24+
border-radius: 5px;
25+
width: 80px;
26+
}

0 commit comments

Comments
 (0)