Introduction
HTML has a rich set of controls to create forms like a registration page, sign-up page, etc. That means those controls are used in the HTML form page, called HTML form controls. Here controls mean handling the HTML form tags that should be used for creating a responsive form page.
What is HTML
HTML, which stands for Hyper Text Markup Language, is a language used for creating web pages. Hypertext refers to text that is underlined and linked to another page, also known as hypertext. It's important to note that HTML is a markup language, not a programming language. A markup language uses tags to define elements within a document, making it easily readable by humans. When creating a web page, the home page is typically saved as "index.html".
Structure of HTML
HTML stands for Hypertext Markup Language and is used to create web pages. HTML documents are structured using a series of tags, which define the structure and content of the page.
An HTML document begins with a DOCTYPE declaration, which tells the browser which version of HTML the document is written in. This is followed by the HTML tag, which contains two main sections: the head and the body.
The head section contains information about the document, such as the title of the page, links to external stylesheets and scripts, and meta information about the page. The body section contains the actual content of the page, such as text, images, and other media.
Inside the head section, you can include various meta tags that provide additional information about the page, such as the character encoding, author, and description.
Here is an example of the basic structure of an HTML document:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
</body>
</html>
In this example, the DOCTYPE declaration is <!DOCTYPE html>, which tells the browser that the document is written in HTML5. The HTML tag contains the head and body sections. The head section contains a title tag, which sets the title of the page to "Page Title". The body section contains an h1 tag, which creates a heading, and a p tag, which creates a paragraph of text.
Basic overview of HTML
This HTML structure is mandatory for executing any HTML web page. All HTML tags are written in-between angle braces. If any HTML Tag is opened then you close the tag mandatory. The HTML code is divided into two parts first one is the head part another is the body part. All file links or CSS pages are added in a head section and the body part or a display part contains all body contents displayed on a web page.
What is CSS
CSS is referred to as Cascading Style Sheets that are used for designing web pages, to change the background color, font size, border, etc. CSS for describing the presentation of Web pages. CSS and HTML both are independent of markup language. The separation of HTML from CSS makes it easier to maintain web pages, and all HTML tags are called with the name of the tag directly but CSS is a sense for designing with class name or id name class is a set of the entity which defines the behavior of tags and id is unique, in a CSS all classes are accessible with using the dot operator(.) and all id are accessible with the has operator(#). All CSS files are saved .css extension; the main CSS file is saved with the name style.css.
Form Tag
The form tag should be used for creating a form. The form like login, sign-up, registration, etc. if you are maintaining a user record that’s why creating a form for collecting user information for maintaining records.
<form> //use for open tag
</form> // use for close tag
Form Tag Attribute
The form tag has many attributes like"
Name
The name attribute defines the form name.
Action
The action attribute is used to call the function and the backend script is ready to process your passed data.
Method
The method attribute specifies the method which one is used there are two methods available in any OOP language first one is Post and another one is Get. The post method is used to store details in a database and the Get method is used for fetching the user details on a web page.
Enctype
The encrypt attribute is used to maintain security because users can submit or upload a document and do not fetch the document from a third party.
mutlipart/form-data
The multipart or form-data attribute is used for uploading an image, files, etc.
HTML Forms Controls
Text Input Controls
It is used to get the user's single-line input in the form record. Text input controls have many attributes like type, name, value, size, placeholder, and maxlength.


Join the conversation! Your thoughts help the community grow.