This repository has been archived on 2025-10-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2bki21/progp/24-9-11/form.html
2024-09-25 10:13:09 +02:00

42 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML-Formular</title>
<!-- wenn man in eine andere datei machen. UNWICHTIG GERADE -> <link rel="stylesheet" type="text/css" href="style.css"> -->
<style>
div {
border: 1px solid silver;
margin: 8px 0; /*Aussenabstand oben/unten 8px*/
padding: 4px; /*innenabstand überall 8px*/
background-color: lightgray;
}
label {
display: inline-block;
width: 100px;
}
</style>
</head>
<body>
<!-- form.tm-->
<h1>HTML-Formular</h1>
<h2>Inputfeld</h2>
<form action="">
<!-- div -> division ist ein container-->
<div>
<label for="user_vorname">Vorname: </label>
<input id="user_vorname" type="text" name="vorname">
<!-- /\ tpye = "text" ist default - kann wegfallen /\}-->
</div>
<div>
<label for="user_nachname">Nachname: </label>
<input id="user_nachname" type="text" name="nachname">
</div>
<button>Ab damit</button>
</form>
</body>
</html>