form & input

이빈·2023년 10월 22일

html/css

목록 보기
13/18

form 태그란

웹 페이지에서의 입력 양식을 의미.

  • form name="" (작성한 내용이 전달되는 이름)
  • form action="" (작성한 내용이 어떤 서버경로로 전달될지)
  • form method="" (작성한 내용이 어떤 방식으로 서버에 전달될지)

input의 type

<input type="text">
<input type="email">
<input type="password">
<input type="radio">
<input type="file">
<input type="checkbox">
<input type="submit">
<select>
  <option>옵션1</option>
</select>
<textarea></textarea>

input에 넣는 속성

  • placeholder => 배경글자
  • value => 미리 입력된 값
  • name => 인풋의 이름 설정

input의 css셀렉터

input[type=email] {
  color : grey
}

input의 타입 속성이 email인 것만!

++) 전송 버튼은 아래 둘 중에 하나로 쓰면 된다..

<button type="submit">전송</button>
<input type="submit">

0개의 댓글