検索

HTMLフォーム入力タイプ

Sep 04, 2024 pm 04:53 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

HTML の タグは、ユーザー側からデータを受け入れるための Web フォーム内の対話型コントロールを設計するために使用されます。使用するユーザー エージェントとデバイスに応じて、さまざまな種類のコントロール ウィジェットと入力データを利用できます。 タグは、属性と入力タイプの組み合わせが非常に多いため、HTML 全体で使用される最も重要な要素の 1 つです。このトピックでは、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 中国語 Web サイトの他の関連記事を参照してください。

声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
HTML、CSS、およびJavaScriptの理解:初心者向けガイドHTML、CSS、およびJavaScriptの理解:初心者向けガイドApr 12, 2025 am 12:02 AM

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

HTMLの役割:Webコンテンツの構造HTMLの役割:Webコンテンツの構造Apr 11, 2025 am 12:12 AM

HTMLの役割は、タグと属性を使用してWebページの構造とコンテンツを定義することです。 1。HTMLは、読みやすく理解しやすいようなタグを介してコンテンツを整理します。 2。アクセシビリティとSEOを強化するには、セマンティックタグなどを使用します。 3. HTMLコードの最適化により、Webページの読み込み速度とユーザーエクスペリエンスが向上する可能性があります。

HTMLとコード:用語を詳しく見るHTMLとコード:用語を詳しく見るApr 10, 2025 am 09:28 AM

htmlisaspecifictypeofcodefocuseduructuringwebcontent

HTML、CSS、およびJavaScript:Web開発者に不可欠なツールHTML、CSS、およびJavaScript:Web開発者に不可欠なツールApr 09, 2025 am 12:12 AM

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。

HTML、CSS、およびJavaScriptの役割:コアの責任HTML、CSS、およびJavaScriptの役割:コアの責任Apr 08, 2025 pm 07:05 PM

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

HTMLは初心者のために簡単に学ぶことができますか?HTMLは初心者のために簡単に学ぶことができますか?Apr 07, 2025 am 12:11 AM

HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用​​できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

HTMLでの開始タグの例は何ですか?HTMLでの開始タグの例は何ですか?Apr 06, 2025 am 12:04 AM

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

CSSのフレックスボックスレイアウトを使用して、メニューの点線のラインセグメンテーション効果のセンターアラインメントを実現する方法は?CSSのフレックスボックスレイアウトを使用して、メニューの点線のラインセグメンテーション効果のセンターアラインメントを実現する方法は?Apr 05, 2025 pm 01:24 PM

メニューで点線のラインセグメンテーション効果を設計する方法は?メニューを設計するときは、通常、皿の名前と価格の間に左右に合わせることは難しくありませんが、真ん中の点線またはポイントはどうですか...

See all articles

ホット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ヘンタイを無料で生成します。

ホットツール

SecLists

SecLists

SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

EditPlus 中国語クラック版

EditPlus 中国語クラック版

サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

VSCode Windows 64 ビットのダウンロード

VSCode Windows 64 ビットのダウンロード

Microsoft によって発売された無料で強力な IDE エディター