본문 바로가기
HTML

HTML input type

by KDW999 2023. 1. 31.

input type

데이터를 입력하거나 위젯을 만드는 요소

 

text 타입 : 한 줄의 텍스트 입력 필드

<span>Text Input</span> <br/>
<input type = "text"/>  <br/>

 

 

password 타입 : 비밀번호 입력 필드

<span>Password Input</span> <br/>
 <input type = "password"/> <br/>

 

 

checkbox 타입 : 체크박스 정의 /  체크 박스를 중복 선택 가능

 

<span>CheckBox Input</span> <br/>
<input name = "checkbox" type = "checkbox"/> <br/>
<input name = "checkbox" type = "checkbox"/> <br/>

 

radio 타입 : 라디오 버튼 정의 / 중복 선택 안됨

<span>Radio Input</span> <br/>
<input name = "radio" type = "radio"/>
<input name = "radio" type = "radio"/> <br/>

 

date 타입 : 날짜를 포함하는 입력 필드

<span>Date Input</span> <br/>
<input type = "date"/> <br/>

 

datetime-local 타입 : 날짜 및 시간 입력 필드

<span>DateTime Input</span> <br/>
<input type = "datetime-local"/> <br/>

 

button 타입 : 버튼 정의

<span>Button</span>  <br/>
<button>버튼</button>

 

위에 코드들을 작성 시 나오는 화면

 

이 외에 input type 요소

https://www.w3schools.com/html/html_form_input_types.asp

'HTML' 카테고리의 다른 글

HTML 간단한 회원가입 화면 만들기  (0) 2023.02.01
class / id  (0) 2023.02.01
HTML 블록(Block) / 인라인(Inlin) / div, span 요소  (1) 2023.01.31
HTML 기본  (0) 2023.01.31

댓글