본문 바로가기
웹프로그래밍/HTML5

[HTML5] form / input

by 폴더맨 2024. 6. 9.
<!Doctype html>
<html>
<head>
<title> 6장 form input </title>
<style>
form.form-example {
    display: table;
}

div.form-example {
    display: table-row;
}

label, input {
    display: table-cell;
    margin-bottom: 10px;
}

label {
    padding-right: 10px;
}
</style>
</head>
<body>
<form action="" method="get" class="form-example">
  <div class="form-example">
    <label for="name">Enter your name: </label>
    <input type="text" name="name" id="name" required>
  </div>
  <div class="form-example">
    <label for="email">Enter your email: </label>
    <input type="email" name="email" id="email" required>
  </div>
  <div class="form-example">
    <input type="submit" value="Subscribe!">
  </div>
</form>
</body>
</html>

'웹프로그래밍 > HTML5' 카테고리의 다른 글

[HTML5] font-variant  (0) 2024.06.09
[HTML5] 의사클래스  (0) 2024.06.09
[HTML5] video  (0) 2024.06.09
[HTML5] audio  (0) 2024.06.08
[HTML5] table / colgroup  (0) 2024.06.08