label : 이름, 나이
<!-- label을 사용하지 않았을 때 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="">
<div>
<input type="text" id="name_id" name="name" value="김코딩">
</div>
<div>
<input type="number" id="age_id" name="age" value="26">
</div>
<span>
<input type="checkbox" name="css" value="CSS">css1
</span>
<span>
<input type="checkbox" name="html" value="HTML">html
</span>
</form>
</body>
</html>
<br>
<body>
<form>
<label for="profile">Profile Photo</label>
<input id="profile" type="file" accept=".png,.pdf">
<br>
<label for="first-name">성</label>
<input id="first-name" required placeholder="First Name을 입력하세요." type="text">
<!--First name 글자를 웹사이트에서 누르면 name 칸에 입력을 바로 할 수 있게 된다.-->
<br>
<label for="website">웹사이트</label>
<input id="website" required placeholder="url을 입력하세요." type="url"/>
<!--url 전용 칸이기 때문에 url외에 다른 문자를 쓰면 'url을 입력하세요'라는 창이 뜬다. -->
<br>
<label for="email">이메일</label>
<input id="email" required placeholder="Email을 입력하세요." type="email"/>
<!--완전한 이메일 형식이 될 때 까지 '@을 이메일에 포함시켜주세요.'등의 문구가 뜬다.-->
<br>
<label for="range">범위</label>
<input id="range" required placeholder="Name" type="range"/>
<!--range type-->
<br>
<label for="date">날짜</label>
<input id="date" required placeholder="Name" type="date"/>
고유식별자라는 의미 답게, id는 scripting이나 CSS에서 정확히 어떤 부분을 꾸밀것인지 식별하기 위해서 쓴다.
예를 들어, CSS는 id를 기준으로 '너는 파란색', '너는 빨간색', 'website라는 id를 가진 input 태그 부분을 파란색으로 해줘'식으로 동작한다.