>  기사  >  웹 프론트엔드  >  HTML 양식 입력 유형

HTML 양식 입력 유형

WBOY
WBOY원래의
2024-09-04 16:53:54449검색

HTML의 태그는 사용자 측에서 데이터를 받아들이기 위해 웹 양식에서 대화형 컨트롤을 디자인하는 데 사용됩니다. 사용되는 사용자 에이전트 및 장치에 따라 다양한 유형의 제어 위젯 및 입력 데이터를 사용할 수 있습니다. 태그는 속성과 입력 유형의 조합이 매우 많기 때문에 모든 HTML에서 사용되는 가장 중요한 요소 중 하나입니다. 이번 주제에서는 HTML 양식 입력 유형에 대해 알아보겠습니다.

HTML 양식 입력 유형

태그는 HTML

의 중요한 요소입니다. 요소. 내부의 "type" 속성 태그는 다양한 유형이 있을 수 있으며 텍스트 상자를 제공합니다. 태그는 텍스트입니다.

HTML에서 사용할 수 있는 "입력" 유형 목록

Type Description Format Example
button Used to define a push button with the text of the button being the value of the value attribute. HTML 양식 입력 유형


checkbox Used to define a checkbox allowing users to select/deselect its values. HTML 양식 입력 유형


Cricket
Tennis
Football
file Used to define a file upload feature on the local system with the accept attribute being used to restrict the file types for upload. HTML 양식 입력 유형


<input type="file" name="newfile">

hidden Used to hide a control whose value will be submitted on the server. There is an example in the next column, but it’s hidden!
image A graphical submit button — displaying an image defined with the src attribute. The alt attribute displays if the image src is missing. HTML 양식 입력 유형


password Used to define a single-line text field whose value is obscured, and it will also alert the user if the site is not secure HTML 양식 입력 유형



radio Used to define a radio button and select a single value out of multiple. HTML 양식 입력 유형


Red
Blue
Green
reset Used to define a button to reset the form values to its defaults. HTML 양식 입력 유형


submit Used to define a submit button for the form. HTML 양식 입력 유형


text Used to define a text field in the form. HTML 양식 입력 유형



List of the types of “input” available in HTML5

Type Description Format Example
color Used to define the color of the elements in an HTML form. It takes a hexadecimal input. HTML 양식 입력 유형


datetime-local Used to define an element for date and time in the HTML form with opening a date picker or numeric wheels for the month, day, and year, when used in supported browsers. HTML 양식 입력 유형


email Used to define a text field for email which has all the predefined validations done for checking an email. HTML 양식 입력 유형


date Used to define a date picker for the HTML form. HTML 양식 입력 유형


number Used to input numbers in the HTML form by displaying a spinner and adding default validation when used in supported browsers. HTML 양식 입력 유형


range Used to define a range in the HTML form. HTML 양식 입력 유형


search Used to define single-line text fields for entering search strings. HTML 양식 입력 유형


tel Used to define a telephone entering field within an HTML form. HTML 양식 입력 유형


time Used to define a field for entering time in HTML form HTML 양식 입력 유형


url Used to define a text field for entering a url in the HTML form with all its validations being performed automatically.

 

HTML 양식 입력 유형


week Used to define a text field for entering the week-year number and a week number with no time zone. HTML 양식 입력 유형


datetime Used to define a text field for entering a date and time (hour, minute, second, and fraction of a second) based on the UTC time zone. HTML 양식 입력 유형


속성

아래 섹션에서는 간단한 설명과 함께 모든 관련 속성을 나열하는 표를 제공합니다. 이 표 다음에는 각 속성과 연관된 입력 유형을 더 자세히 설명하는 목록이 표시됩니다. 대부분 또는 모든 입력 유형에 공통되는 유형은 아래에 더 자세히 정의되어 있습니다.

Attribute Types
1.       accept file
2.       alt image
3.       autocomplete all
4.       autofocus all
5.       capture file
6.       checked radio, checkbox
7.       dirname text, search
8.       disabled all
9.       form all
10.    formaction image, submit
11.    formenctype image, submit
12.    formmethod image, submit
13.    formnovalidate image, submit
14.    formtarget image, submit
15.    height image
16.    list almost all
17.    max numeric types
18.    maxlength password, search, tel, text, url
19.    min numeric types
20.    minlength password, search, tel, text, url
21.    multiple email, file
22.    name all
23.    pattern password, text, tel
24.    placeholder password, search, tel, text, url
25.    readonly almost all
26.    required almost all
27.    size email, password, tel, text
28.    src image
29.    step numeric types
30.    type all
31.    value all
32.    width image

결론 – HTML 양식 입력 유형

HTML5의 새로운 양식 입력 유형을 사용하면 사용자 경험을 향상하고, 미래 지향적인 애플리케이션을 만들고, 개발자의 코딩을 좀 더 쉽게 만들 수 있습니다. 이러한 새로운 양식 입력 유형에 대한 지원은 특히 키패드가 있는 모바일 장치에서 강력합니다. 이러한 입력 유형은 사용 목적상 안전하며 사용자에게 추가 유틸리티도 제공합니다.

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

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