<!Doctype html>
<html>
<head>
<title> 7장 의사클래스 </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;
}
input:focus { background-color: red; }
input:hover { background-color: orange; }
input:active { background-color:: blue; }
</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">
<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] position z-index (0) | 2024.06.09 |
---|---|
[HTML5] font-variant (0) | 2024.06.09 |
[HTML5] form / input (0) | 2024.06.09 |
[HTML5] video (0) | 2024.06.09 |
[HTML5] audio (0) | 2024.06.08 |