Let's iterate through an HTML form, its fields, and its values. Show the value and the text of the selected option. Working with forms will be much more convenient when we learn them. Disabling all form elements. HTMLFormElement.lengthRead only 1. We’ll meet many examples further in the tutorial. There are two specific element types: FieldElement; GroupElement; The Element class is a read-only base class which has no constructor. That’s simple: defaultSelected sets HTML-attribute, that we can get using option.getAttribute('selected'). The elements are placed on the HTML form using CSS via their style attribute.