목차
HTML 양식을 만드는 방법은 무엇입니까?
HTML로 된 등록 양식의 예
예시 1: 간단한 등록 양식
등록 양식: 검증
예시 2: 입사 지원서 양식
예 3: 호텔 등록 양식
웹 프론트엔드 HTML 튜토리얼 HTML로 된 등록 양식

HTML로 된 등록 양식

Sep 04, 2024 pm 04:44 PM
html html5 HTML Tutorial HTML Properties HTML tags

HTML 양식은 오늘날 수많은 웹사이트에서 볼 수 있는 필수 구성 요소로, 사용자 인증, 등록, 피드백 수집 등과 같은 다양한 목적을 수행합니다. 이러한 양식을 사용하면 사이트 방문자로부터 귀중한 데이터와 정보를 쉽게 수집할 수 있습니다.

HTML 양식은 '컨트롤'이라는 특수 요소를 사용하여 구성됩니다. 이러한 컨트롤에는 텍스트 영역, 라디오 버튼, 체크박스, 제출 버튼과 같은 다양한 옵션이 포함되어 있어 사용자가 세부 정보를 효과적으로 입력할 수 있습니다. 사용자는 이러한 컨트롤과 상호 작용하여 텍스트를 입력하고, 특정 항목을 선택하고, 기타 관련 작업을 수행하여 제공된 정보를 수정할 수 있습니다. 양식이 완성되면 제출할 수 있으며, 데이터 추가, 전송, 다른 페이지로 리디렉션, 데이터베이스에 세부 정보 저장 등 다양한 결과가 나타날 수 있습니다.

HTML 양식은 웹사이트 방문자의 참여를 유도하기 위한 대화형의 사용자 친화적인 수단입니다. 이는 사용자와 웹사이트 소유자 간의 원활한 커뮤니케이션과 데이터 교환을 촉진하여 기업이 중요한 통찰력을 수집하고 사용자 경험을 향상시킬 수 있도록 지원합니다.

HTML 양식을 만드는 방법은 무엇입니까?

HTML 양식을 만들려면

양식 콘텐츠의 컨테이너 역할을 하는 요소입니다.
, 과 같은 다른 HTML 요소와 함께 완전한 기능을 갖춘 양식을 디자인할 수 있습니다. 또한 CSS를 활용하여 모양과 사용자 경험을 향상시킬 수 있습니다.

참고: 웹 개발이 처음이고 기본 HTML 코드 작성 방법을 배우려는 경우 HTML로 웹페이지 디자인에 대한 도움말을 참조하세요. HTML 코드 작성에 대한 단계별 가이드를 제공합니다.

이 기사에서 HTML로 웹페이지를 디자인할 때 다루는 주요 사항은 다음과 같습니다.

  1. 프로젝트를 어떻게 설정하나요?
  2. HTML 구조는 어떻게 시작하나요?
  3. 본문에 콘텐츠를 추가하는 방법은 무엇인가요?
  4. 콘텐츠를 어떻게 구성하나요?
  5. HTML 파일을 어떻게 저장하나요?
  6. 웹페이지를 보는 방법은 무엇인가요?

다음은 HTML 양식의 기본 구문입니다.

구문:

<form action = "URL" method = "GET or POST">
form elements like submit or reset buttons, input, text area etc.
</form>
로그인 후 복사

HTML로 된 등록 양식의 예

HTML을 사용한 등록 양식의 몇 가지 예를 살펴보겠습니다.

예시 1: 간단한 등록 양식

간단한 HTML 등록 양식을 만드는 예는 다음과 같습니다.

코드:

<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
width: 400px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
margin-top: 0;
}
p {
text-align: center;
color: #777;
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 10px;
color: #333;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #ccc;
}
a {
color: #337ab7;
text-decoration: none;
}
button[type="submit"] {
display: block;
width: 100%;
padding: 10px;
margin-top: 20px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
}
button[type="submit"]:hover {
background-color: #45a049;
}
.container.signin {
text-align: center;
color: #777;
}
</style>
</head>
<body>
<form>
<div class="container">
<h1>Register Here</h1>
<p>Please fill in the details to create an account with us.</p>
<hr>
<label for="email"><b>Enter Email</b></label>
<input type="text" placeholder="Enter Email" name="email">
<label for="pwd"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="pwd">
<label for="confirm"><b>Confirm Password</b></label>
<input type="password" placeholder="Confirm Password" name="confirm">
<hr>
<p>By creating an account you agree to our <a href="#">Terms & Privacy</a>.</p>
<button type="submit" class="registerbtn"><strong>Register</strong></button>
</div>
<div class="container signin">
<p>Already have an account? <a href="#">Sign in</a>.</p>
</div>
</form>
</body>
</html>
로그인 후 복사

출력:

HTML로 된 등록 양식

등록 양식: 검증

사용자가 이메일 주소를 입력할 수 있도록 비밀번호 및 확인 입력 여부와 관계없이 이메일 필드를 작성하지 않고 양식을 제출하려고 하면 팝업을 실행하는 확인 코드가 포함됩니다.

요소와 함께 '필수'라는 키워드는 해당 요소를 채워야 함을 나타냅니다. 이 키워드를 텍스트 필드 '이메일'에 추가하면 아래 결과가 표시됩니다.

<input type="text" placeholder="Enter Email" name="email" required>
로그인 후 복사

비밀번호 및 비밀번호 확인 필드에도 마찬가지로 작업이 필요합니다.

<input type="password" placeholder="Enter Password" name="pwd" required>
<input type="password" placeholder="Confirm Password" name="confirm" required>
로그인 후 복사

출력:
HTML로 된 등록 양식

예시 2: 입사 지원서 양식

다음은 HTML로 입사 지원서 등록 양식을 생성하는 예입니다.

코드:

<!DOCTYPE html>
<html>
<head>
<title>Job Application Registration Form</title>
<style>
body {
font-family: Calibri, sans-serif;
background-color: #72b7f4;
}
h2 {
color: #232729;
text-align: center; /* Center align the title */
}
form {
background-color: #bfddf7;
max-width: 500px;
margin: 0 auto;
padding: 30px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 10px;
color: #333333;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"] {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 15px;
background-color: #ffffff; /* Set background color to white */
}
select {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 15px;
}
input[type="submit"] {
background-color: #1a73e8;
color: #ffffff;
border: none;
padding: 12px 24px;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #0059b3;
}
</style>
</head>
<body>
<h2>Job Application Registration</h2>
<form action="/apply" method="POST">
<label for="name">Full Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email Address:</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required>
<label for="resume">Resume (PDF or Word):</label>
<input type="file" id="resume" name="resume" accept=".pdf,.doc,.docx" required>
<label for="position">Position Applied:</label>
<select id="position" name="position" required>
<option value="">Select Position</option>
<option value="frontend-developer">Frontend Developer</option>
<option value="backend-developer">Backend Developer</option>
<option value="graphic-designer">Graphic Designer</option>
</select>
<input type="submit" value="Submit Application">
</form>
</body>
</html>
로그인 후 복사

출력:
HTML로 된 등록 양식

예 3: 호텔 등록 양식

다음은 HTML로 호텔 등록 양식을 생성하는 예입니다.

코드:

<!DOCTYPE html>
<html>
<head>
<title>Hotel Registration Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0bd9d;
padding: 20px;
}
form {
max-width: 500px;
margin: 0 auto;
background: linear-gradient(to bottom right, #fff, #f1f1f1);
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
.form-row {
margin-bottom: 20px;
}
.form-row label {
display: block;
margin-bottom: 5px;
}
.form-row input,
.form-row select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
font-size: 14px;
}
input[type="submit"] {
padding: 10px 20px;
background: linear-gradient(to bottom right, #db4340, #ff6f00);
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
</style>
</head>
<body>
<img src="image.jpg" alt="Hotel Image" style="display: block; margin: 0 auto 20px; width: 500px;">
<form>
<div class="form-row">
<label for="name">Name</label>
<input type="text" id="name" name="name">
</div>
<div class="form-row">
<label for="email">Email ID</label>
<input type="email" id="email" name="email">
</div>
<div class="form-row">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone">
</div>
<div class="form-row">
<label for="guests">Number of Guests</label>
<input type="number" id="guests" name="guests">
</div>
<div class="form-row">
<label for="check-in">Check-in Date</label>
<input type="date" id="check-in" name="check-in">
</div>
<div class="form-row">
<label for="check-out">Check-out Date</label>
<input type="date" id="check-out" name="check-out">
</div>
<div class="form-row">
<label for="room-type">Room Type</label>
<select id="room-type" name="room-type">
<option value="">Select Room Type</option>
<option value="single">Single</option>
<option value="double">Double</option>
<option value="suite">Suite</option>
</select>
</div>
<input type="submit" value="Submit">
</form>
</body>
</html>
로그인 후 복사

출력:

HTML로 된 등록 양식

위 내용은 HTML로 된 등록 양식의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 채팅 명령 및 사용 방법
1 몇 달 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

HTML의 테이블 테두리 HTML의 테이블 테두리 Sep 04, 2024 pm 04:49 PM

HTML의 테이블 테두리 안내. 여기에서는 HTML의 테이블 테두리 예제를 사용하여 테이블 테두리를 정의하는 여러 가지 방법을 논의합니다.

HTML 여백-왼쪽 HTML 여백-왼쪽 Sep 04, 2024 pm 04:48 PM

HTML 여백-왼쪽 안내. 여기에서는 HTML margin-left에 대한 간략한 개요와 코드 구현과 함께 예제를 논의합니다.

HTML의 중첩 테이블 HTML의 중첩 테이블 Sep 04, 2024 pm 04:49 PM

HTML의 Nested Table에 대한 안내입니다. 여기에서는 각 예와 함께 테이블 내에 테이블을 만드는 방법을 설명합니다.

HTML 테이블 레이아웃 HTML 테이블 레이아웃 Sep 04, 2024 pm 04:54 PM

HTML 테이블 레이아웃 안내. 여기에서는 HTML 테이블 레이아웃의 값에 대해 예제 및 출력 n 세부 사항과 함께 논의합니다.

HTML 입력 자리 표시자 HTML 입력 자리 표시자 Sep 04, 2024 pm 04:54 PM

HTML 입력 자리 표시자 안내. 여기서는 코드 및 출력과 함께 HTML 입력 자리 표시자의 예를 논의합니다.

HTML 정렬 목록 HTML 정렬 목록 Sep 04, 2024 pm 04:43 PM

HTML 순서 목록에 대한 안내입니다. 여기서는 HTML Ordered 목록 및 유형에 대한 소개와 각각의 예에 대해서도 설명합니다.

HTML에서 텍스트 이동 HTML에서 텍스트 이동 Sep 04, 2024 pm 04:45 PM

HTML에서 텍스트 이동 안내. 여기서는 Marquee 태그가 구문과 함께 작동하는 방식과 구현할 예제에 대해 소개합니다.

HTML 온클릭 버튼 HTML 온클릭 버튼 Sep 04, 2024 pm 04:49 PM

HTML onclick 버튼에 대한 안내입니다. 여기에서는 각각의 소개, 작업, 예제 및 다양한 이벤트의 onclick 이벤트에 대해 설명합니다.

See all articles