form

object form extends Tag with Attr

The <strong>HTML <code><form></code> element</strong> represents a document section that contains interactive controls to submit information to a web server. select - This attribute lets you specify the form element to which the select element is associated (that is, its "form owner"). If this attribute is specified, its value must be the ID of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements. object - The form element, if any, that the object element is associated with (its <em>form owner</em>). The value of the attribute must be an ID of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element in the same document. input - The form element that the input element is associated with (its <em>form owner</em>). The value of the attribute must be an <strong>id</strong> of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element in the same document. If this attribute is not specified, this <code><input></code> element must be a descendant of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element. This attribute enables you to place <code><input></code> elements anywhere within a document, not just as descendants of their form elements. An input can only be associated with one form. button - The form element that the button is associated with (its <em>form owner</em>). The value of the attribute must be the <strong>id</strong> attribute of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element in the same document. If this attribute is not specified, the <code><button></code> element will be associated to an ancestor <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element, if one exists. This attribute enables you to associate <code><button></code> elements to <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> elements anywhere within a document, not just as descendants of <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> elements. output - The form element that this element is associated with (its "form owner"). The value of the attribute must be an ID of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements. label - The form element with which the label is associated (its <em>form owner</em>). If specified, the value of the attribute is the ID of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements.<br>  

This content attribute was <a class="external" href="https://github.com/whatwg/html/pull/1120">removed from the HTML specification</a> on April 28, 2016. However, scripts still have access to a read-only <a title="The read-only HTMLLabelElement.form property returns an HTMLFormElement object which represents the form of which the label's associated control is a part, or null if there is either no associated control, or if that control isn't in a form." href="/en-US/docs/Web/API/HTMLLabelElement/form"><code>HTMLLabelElement.form</code></a> attribute; it returns the form of which the label's associated control is a member, or <code>null</code> if the label is not associated with a control or the control isn't part of a form. textarea - The form element that the <code><textarea></code> element is associated with (its "form owner"). The value of the attribute must be the ID of a form element in the same document. If this attribute is not specified, the <code><textarea></code> element must be a descendant of a form element. This attribute enables you to place <code><textarea></code> elements anywhere within a document, not just as descendants of their form elements. keygen - The form element that this element is associated with (its <em>form owner</em>). The value of the attribute must be an <code>id</code> of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element in the same document. If this attribute is not specified, this element must be a descendant of a <a title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"><code><form></code></a> element. This attribute enables you to place <code><keygen> </code>elements anywhere within a document, not just as descendants of their form elements. meter - This attribute associates the element with a <code>form</code> element that has ownership of the <code>meter</code> element. For example, a <code>meter</code> might be displaying a range corresponding to an <code>input</code> element of <code>type</code> <em>number</em>. This attribute is only used if the <code>meter</code> element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a <code>form</code> element. fieldset - This attribute has the value of the <strong>id </strong>attribute of the <a href="/en-US/docs/Web/HTML/Element/form" title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server."><code><form></code></a> element it's related to. Its default value is the <strong>id</strong> of the nearest <a href="/en-US/docs/Web/HTML/Element/form" title="The HTML <form> element represents a document section that contains interactive controls to submit information to a web server."><code><form></code></a> element it is a descendant of.

trait Attr
trait Tag
class Object
trait Matchable
class Any

Type members

Classlikes

object tag extends TagElement

Types

type tagType = tag

Inherited types

type supports[T <: Tag] = AttrPair[attrType] => AttrPair[tagType]
Inherited from
Attr

Value members

Concrete methods

@inline
def :=(v: String): AttrPair[_form_attr]
@inline
def :=(v: Option[String]): OptionalAttrPair[_form_attr]
@inline
def apply(mods: TagMod[tag]*): WithAttrs[tagType]