반응형
<!DOCTYPE html>
<html lang="kr">
<head>
<title>Home - My first website.</title>
</head>
<body>
<form>
<label for="profile">Profile Photo</label>
<input id="profile" type="file" accept=".jpg" />
<label for="first-name">First Name</label>
<input id="first-name" required placeholder="Name" type="text" />
<input required placeholder="Last Name" type="text" />
<input required placeholder="Username" type="text" />
<input required placeholder="Password" minlength="10" type="password" />
<input type="submit" value="Create Account" />
</form>
</body>
</html>
결과
- Profile Photo 문자 클릭 시: 파일창이 열림
- First Name 문자 클릭 시: Name input 창에 커서가 생김
반응형
'1. HTML' 카테고리의 다른 글
HTML div 태그 사용법 (0) | 2024.11.10 |
---|---|
html 에서 id 값은 고유해야 한다. (0) | 2024.11.08 |
html form 태그로 파일 올리기 업로드 (file accept) (0) | 2024.11.07 |
html form 태그 이용하기 (1) | 2024.11.07 |
html form 태그 안의 <input> (0) | 2024.11.06 |