[HTML] form

귤티·2025년 4월 19일

front

목록 보기
1/10
<head>
	<style>
    	input, select, textarea {
        	display: block;
            margin: 20px;
        }
    </style>
</head>
<body>
<form>
	<input type="text">
    <input type="password">
    <input type="checkbox">
    <input type="radio">
    <input type="date">
    <input type="time">
    <input type="file">
    <textarea></textarea>
    <select>
    	<option>사과</option>
        <option></option>
        <option></option>
        <option>수박</option>
    </select>
</form>
</body>

input type

  • text(default) // 한 줄만 받는다.
  • password
  • email
  • checkbox
  • radio
  • email
  • date
  • time
  • file -> 파일 선택

input은 기본적으로 Inline display 속성을 가진다.

textarea // 여러 줄 입력

select -> 여러 개 옵션들 중에서 하나를 선택

form 태그의 action이라는 속성에 데이터를 처리해주는 소프트웨어의 주소를 적어준다.

profile
취준 진입

0개의 댓글