Membuat Tata Letak atau Layout dengan HTML dan CSS
Script :
<!DOCTYPE html>
<html>
<body>
<head>
<style>
.flex-container {
display:
-webkit-flex;
display: flex;
-webkit-flex-flow:
row wrap;
flex-flow: row wrap;
font-weight: bold;
text-align: center;
}
.flex-container > * {
padding: 10px;
flex: 1 100%;
}
.main {
text-align: left;
background:
cornflowerblue;
}
.header {background: coral;}
.footer {background: lightgreen;}
.aside1 {background: moccasin;}
.aside2 {background: violet;}
@media all and (min-width: 768px) {
.aside { flex: 1
auto; }
.main { flex: 3 0px; }
.aside1 { order: 1;
}
.main { order: 2; }
.aside2 { order: 3;
}
.footer { order: 4; }
//untuk
memodifikasi design, atau style untuk form html
}
</style>
</head>
<body>
<div class="flex-container">
<header
class="header">Header</header>
<aside
class="aside aside1">Aside 1</aside>
<article
class="main">
//menampilkan
masing2 class didalam body
<h2>Grouping Form Data with Fieldset</h2>
<p>The fieldset element is used to group related data
in a form, and the legend element defines a caption for the fieldset
element.</p>
<form action="/action_page.php">
<fieldset>
<legend>fValidator:</legend>
ID:<br>
<input type="text"
name="firstname" value="">
<br>
Password:<br>
<input
type="text" name="password" value="">
<br>
Confirm
Password:<br>
<input
type="text" name="password2" value="">
<br>
Name:<br>
<input
type="text" name="name" value="">
<br>
Sex:<br>
<input
type="checkbox" name="" value="Male"
placeholder="Male">male
<input
type="checkbox" name="" value="Male"
placeholder="female">female
<br>
Birthday:<br>
<input
type="date" name="bd" value="">
<br>
Phone:<br>
<input
type="text" name="phone" value="">
<br>
Email:<br>
<input
type="text" name="email" value="">
<br>
URL:<br>
<input
type="text" name="url" value="">
<br>
State:<br>
<select
name="state">
<option
value="">Select one</option>
<option
value="saab">Saab</option>
<option
value="fiat">Fiat</option>
<option
value="audi">Audi</option>
</select>
<br><br>
Real
(float):<br>
<input
type="text" name="real" value="">
<br>
<input
type="submit" value="Submit">
<input
type="reset" value="Reset">
</fieldset>
</form>
<p>ini bagian
content</p>
</article>
<aside
class="aside aside2">Aside 2</aside>
<footer class="footer">Footer</footer>
// membuat
form data di dalam body :
</div>
</body>
</html>
Hasil :