HTML Content Models

HTML listed content

Build a form with the HTML form generator

Form-associated elements included in the relevant form or fieldset controls collection, subject to collection rules (for example image inputs are excluded from form.elements). Listed controls can override their form owner using form where specified. Being listed does not guarantee submission. Categories describe authoring constraints and may overlap; they do not determine CSS display or by themselves guarantee accessibility.

Formal Syntax & Structure

html syntaxhtml
<input form="settings" name="city">

Working Example

Example Snippethtml
<form id="settings"></form><label>  City  <input form="settings" name="city" value="Baku"></label><output id="result"></output><script>  document.getElementById("result").textContent=document.getElementById("settings").elements.namedItem("city").value;</script>
HTML Reference