HTML and CSS Reference
GENERAL FORM ATTRIBUTES
h e form (think the mother ship) has several attributes that impact every input element in the
form container. However, the i rst focus is on the form itself. It has the following attributes:
Many of these attributes are rarely used and some only make sense when you start using
programs like PHP and ASP.NET where you pass data to and from a database. However, we'll
examine them all.
Accept-charset, enctype, and novalidate
h e accept-charset attribute, if specii ed at all, usually assigns utf-8 as the character
encoding to be used with the form data. h at is, it treats all input as utf-8 encoding. A
simple statement like the following is sui cient:
< form name =motherShip accept-charset =utf- 8 >
If no character encoding is assigned, it is assumed to be unknown and uses the default
character encoding. When using multiple encodings, each is separated by a space in HTML5
instead of by commas and semicolons as in earlier versions of HTML.
Most of the time, the enctype attribute is let blank and uses the default state. h e enctype
attribute has three keywords and states (keyword/state):
A form may be set up to accept plain text and would be assigned the following:
< form enctype = ”text/plain” >
For the most part, though, this is another attribute that is not included in the <form> tag.
h at's because the default ( urlencoded ) is what you want.