
- Guida HTML
- HTML - Home
- HTML - Introduzione
- HTML - Tag Basiliari
- HTML - Elementi
- HTML - Attributi
- HTML - Formattazione
- HTML - Tags Phrase
- HTML - Meta Tags
- HTML - Commenti
- HTML - Immagini
- HTML - Tabelle
- HTML - Liste
- HTML - Link Testuali
- HTML - Link nelle Immagini
- HTML - Link ad Indirizzi Email
- HTML - Frame
- HTML - Iframe
- HTML - Blocchi
- HTML - Sfondi
- HTML - Colori
- HTML - Fonts
- HTML - Form
- HTML - Incorporare Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Fogli di Stile
- HTML - Javascript
- HTML - Layout
- HTML Referenze
- HTML - Riferimenti Tag
- HTML - Riferimenti Attributi
- HTML - Riferimenti Eventi
- HTML - Riferimenti Font
- HTML - Codici ASCII
- Tabella Codici ASCII
- HTML - Colori
- HTML - Entità
- HTML - Rif Font
- HTML - Rif Eventi
- MIME Media Types
- HTML - Coifica URL
- Codici Linguaggi ISO
- HTML - Codifica Caratteri
- HTML - Tag Deprecati
- HTML Risorse Utili
- HTML - Color Code Builder
- HTML - Editor Online
Il tag HTML <form>
Descrizione
Il tag HTML <form> permette di creare un modulo per consentire all'utente di inserire dati. Esso può contenere campi di testo, checkbox, select, ecc. e vengono usati per passare i dati ad uno specifico URL.
Esempio
<!DOCTYPE html> <html> <head> <title>HTML form Tag</title> </head> <body> <form action="/cgi-bin/hello_get.cgi" method="get"> First name: <input type="text" name="first_name" value="" maxlength="100" /> <br /> Last name: <input type="text" name="last_name" value="" maxlength="100" /> <input type="submit" value="Submit" /> </form> </body> </html>
Produrrà il seguente risultato:
Attributi Globali
Questo tag supporta tutti gli attributi globali descritti in - HTML - Referenze Attributi
Attributi Specifici
The HTML <form> supporta anche i seguenti attributi aggiuntivi:
Attributo | Valore | Descrizione |
---|---|---|
accept | MIME_type | Specifica un elenco di contenuti (separati da virgole) che il server può accettare a comma-separated list of content types that the server accepts. |
accept-charset | charset list | Specifica un elenco di codifica di caratteri che il server accetta. Il valore di default è "unknown". |
action | URL | Specifica un URI / URL dello script di back-end che elaborerà il modulo |
autocomplete![]() | on off | Specifica se il modulo dovrebbe essere completato automaticamente o meno. |
enctype | mimetypes | Il mime type usato per codificare il contenuto del form. |
method | get post | Specifica il metodo HTTP da usare per passare i dati. Può essere: get (i dati vengono aggregati all'URL) post (i dati non vengono aggregati all' URL) |
name | form name | Definisce un nome univoco per il form. |
novalidate ![]() | novalidate | Indica che il form non dovrà essere validato prima di essere inviato. |
target | _blank _self _parent _top | Indica come dovrà essere aperto l'URL di riferimento. _blank - l' URL viene aperto in una nuova finestra _self - l' URL di riferimento viene aperto nella stessa pagina _parent - l' URL di riferimento viene aperto in una nuova pagina _top - l' URL di riferimento viene aperto nella stessa finestra (a pieno schermo) |
Attributi Evento
Questo tag supporta tutti gli attributi evento descritti in - HTML - Referenze Eventi
Compatibilità Browser
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Si | Si | Si | Si | Si | Si |
html_tags_reference.htm
Advertisements