Moved methods for general attributes to the HtmlElement class and also
added option to be required to Field Class