728x90
반응형
아래 예제 코드는 아래 항목들을 출력한다.
텍스트, 비밀번호, 라디오 버튼, 체크박스, 선택 드롭다운, 멀티라인 텍스트, Submit 버튼
<html>
<head>
<title>Form Elements</title>
</head>
<body>
<form>
<!-- Text input -->
<h3>Text Input:</h3>
<input type="text" name="textInput"> <!-- a simple text input field -->
<br><br>
<!-- Password input -->
<h3>Password Input:</h3>
<input type="password" name="passwordInput"> <!-- a password input field -->
<br><br>
<!-- Radio button -->
<h3>Radio Button:</h3>
<input type="radio" name="radioInput" value="option1">Option 1 <!-- a radio button -->
<input type="radio" name="radioInput" value="option2">Option 2 <!-- another radio button -->
<br><br>
<!-- Checkbox -->
<h3>Checkbox:</h3>
<input type="checkbox" name="checkboxInput" value="check1">Check 1 <!-- a checkbox -->
<input type="checkbox" name="checkboxInput" value="check2">Check 2 <!-- another checkbox -->
<br><br>
<!-- Select -->
<h3>Select:</h3>
<select name="selectInput"> <!-- a select dropdown -->
<option value="option1">Option 1</option> <!-- options for the dropdown -->
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select>
<br><br>
<!-- Textarea -->
<h3>Textarea:</h3>
<textarea name="textareaInput"></textarea> <!-- a multi-line text input field -->
<br><br>
<!-- Submit button -->
<h3>Submit Button:</h3>
<input type="submit" value="Submit"> <!-- a submit button -->
</form>
</body>
</html>
728x90
반응형