HTML Form Practice

uomnf97_web·2021년 4월 8일
0

HTML 시리즈

목록 보기
8/9

Form

form 태그는 사용자가 입력한 데이터를 수집하기 위해 사용되며 input, textarea, button, select, checkbox, radio button, submit button 등의 입력 양식 태그를 포함할 수 있다.

button


<h3>checkbox</h3>
<input type="checkbox" name="fruit1" value="apple" checked> 사과<br>
<input type="checkbox" name="fruit2" value="grape"> 포도<br>
<input type="checkbox" name="fruit3" value="peach"> 복숭아<br>
<hr>

<h3>color</h3>
<input type="color" name="mycolor">
<hr>

<h3>date</h3>
<input type="date" name="birthday">
<hr>

<h3>datetime</h3>
<input type="datetime" name="birthdaytime">
<hr>

<h3>datetime-local</h3>
<input type="datetime-local" name="birthdaytime">
<hr>

<h3>email</h3>
<input type="email" name="useremail">
<hr>

<h3>file</h3>
<input type="file" name="myfile">
<hr>

<h3>hidden</h3>
<input type="hidden" name="country" value="Norway">
hidden filed는 사용자에 표시되지 않는다.
<hr>

<h3>image</h3>
<input type="image" src="img/img_submit.gif" alt="Submit" width="48" height="48">
<hr>

<h3>month</h3>
<input type="month" name="birthdaymonth">
<hr>

<h3>number</h3>
<input type="number" name="quantity" min="2" max="10" step="2" value="2">
<hr>

<h3>password</h3>
<input type="password" name="pwd">
<hr>

<h3>radio</h3>
<input type="radio" name="gender" value="male" checked> 남자<br>
<input type="radio" name="gender" value="female"> 여자<br>
<hr>

<h3>range</h3>
<input type="range" name="points" min="0" max="10" step="1" value="5">
<hr>

<h3>reset</h3>
<input type="reset">
<hr>

<h3>search</h3>
<input type="search" name="googlesearch">
<hr>

<h3>submit</h3>
<input type="submit" value="Submit">
<hr>

<h3>tel</h3>
<input type="tel" name="mytel">
<hr>

<h3>text</h3>
<input type="text" name="myname">
<hr>

<h3>time</h3>
<input type="time" name="mytime">
<hr>

<h3>url</h3>
<input type="url" name="myurl">
<hr>

<h3>week</h3>
<input type="week" name="week_year">

참고 : PoiemaWeb

profile
사회적 가치를 실현하는 프로그래머

0개의 댓글