1. form 태그
: 입력 필드 전체를 감싸는 태그
<form action="./login.jsp" method="get">
<input type="text" id="id" placeholder="아이디"><br>
<input type="password" id="pw" placeholder="비밀번호">
</form>
-action : 데이터를 서버로 보낼 때 해당 데이터가 도착할 URL
-method: GET,POST방식이 존재함. (아직 잘모른다)
2. label 태그
: input태그로 된 입력창을 설명하는 태그
<form action="./login.jsp" method="get">
<label for="id">아이디</label>
<input type="text" id="id" placeholder="아이디"><br>
<label for="pw">비밀번호</label>
<input type="password" id="pw" placeholder="비밀번호">
</form>
-label의 for값과 input의 id 값이 같으면 연결됨.
? 의문
id와 name의 차이는 무엇일까?
'HTML & CSS' 카테고리의 다른 글
[HTML][CSS] css 가상요소 - ::after, ::before, content속성 (0) | 2020.12.30 |
---|---|
[HTML][CSS] 이미지 스프라이트 (Image Sprite) (0) | 2020.12.26 |
[HTML][CSS] input 태그 -placeholder,value,checkbox,radio등 (0) | 2020.12.24 |
[HTML][CSS] 무신사 로그인창 구현 (0) | 2020.12.24 |
[HTML][CSS] audio, video, embed 태그 (0) | 2020.12.23 |