HTML name HTML name The name attribute specifies a name for an HTML element. For a <form> element, the name attribute is used as a reference when the data is submitted.