Menu
Coddy logo textTech

Input과 Label

Coddy의 로그인 폼 - HTML/CSS 프로젝트 코스 레슨 — 7개 중 2번째.

<input> 태그는 텍스트 필드, 체크박스, 라디오 버튼, 제출 버튼 등과 같은 다양한 유형의 입력 요소를 위한 컨테이너입니다.

type 속성을 사용하여 유형을 설정합니다.

<input type="text">
<input type="radio">
<input type="checkbox">
<input type="password">
<input type="submit">

입력 요소에 <label> 태그를 추가하는 것이 좋습니다.

<label for="password">Password:</label>
<input type="text" id="password">

for 속성은 입력 요소의 id 속성과 일치해야 두 요소를 서로 연결할 수 있다는 점에 유의하세요.

challenge icon

챌린지

쉬움

id가 "username""password"인 레이블이 있는 두 개의 input 요소를 추가하고, input의 type을 "text""password"로 설정하세요. 각 레이블을 해당 input에 연결하는 것을 잊지 마세요.

모든 요소 사이에 간격을 두기 위해 <br/> 태그를 추가하는 것이 좋습니다!

직접 해보기

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- Write HTML code here -->
</body>
</html>

로그인 폼 - HTML/CSS 프로젝트의 모든 레슨