A form is used to collect some data from the user and in case of HTML form, the visitor fills the form for various purposes like to register on a website or do web search. As the web search done on www.google.com uses form elements to take input from the user of text to search and submit button to submit the query.
The most basic purpose of any form is to collect information. The form is collected and processed. Similarly with online forms are filled out, collected, and processed. As a paper form must be created, online forms need to be made with appropriate tags provided by HTML.