Formularze w HTML 5

jesień 2011

Version:
http://www.plotkarka.eu/PI/html5-struktury/
Editor:
Radosław Kowaluk

Elementy

Elementy formularzy
Element Atrybuty i wartości specyficzne Opis
<form></form> accept-charset, action, enctype, method, name, target formularz
<input> lub <input/> accept, alt, checked, disabled , maxlength, name, size, src, type, value pola formularza
<select></select> disabled, multiple, name, size lista rozwijalna
<option></option> disabled, label, selected, value opcja
<textarea></textarea> cols, disabled , name , readonly, rows pole tekstowe
<button></button> disabled, name, type, value przycisk
<fieldset></fieldset>   grupa elementów
<label></label> for etykieta
<legend></legend>   legenda
<optgroup> </optgroup> label, disabled grupa opcji
<datalist> </datalist> lista danych
<keygen> lub <keygen/> autofocus, challenge, disabled, form, keytype, name generator kluczy

Budowa formularza

Elementy formularza

Atrybuty i wartości

Atrybuty specyficzne
Atrybut Wartość Opis
accept-charset Charsets  
action URI  
enctype ContentType  
method get | post  
accept ContentTypes  
checked checked  
disabled disabled  
maxlength Number  
size Number  
value CDATA  
multiple multiple  
label Text  
selected selected  
cols Number  
readonly readonly  
rows Number  
for IDREF  

Lista rozwijalna

Wartości atrybutów
WartośćOpis
CDATA 
ContentType 
Character 
Charset 
defer 
MediaDesc 
Numberliczba
IDidentyfikator
LanguageCodekod języka
LinkTypestypy linków
ltr 
rtl 
URI 

Wykaz źródeł

[5.; XHTMLMOD11SE]
5. XHTML Abstract Modules; XHTML Modularization 1.1 - Second Edition, W3C Recommendation, Shane McCarron, et al., 29 July 2010
See: http://www.w3.org/TR/xhtml-modularization/abstract_modules.html
[4.10; HTML5]
4.10 Forms;HTML5, W3C Working Draft,Ian Hickson, 24 June 2010
URL: http://www.w3.org/TR/html5/forms.html
URL: http://www.w3.org/TR/html5/the-input-element.html
URL: http://www.w3.org/TR/html5/states-of-the-type-attribute.html
URL: http://www.w3.org/TR/html5/number-state.html
URL: http://www.w3.org/TR/html5/common-input-element-attributes.html
URL: http://www.w3.org/TR/html5/the-button-element.html
URL: http://www.w3.org/TR/html5/association-of-controls-and-forms.html