-
HTML List Box
The list box is a graphical control element in the HTML document that allows a user to select one or more options from the list of options. Syntax To create a list box, use the HTML element <select> which contains two attributes Name and Size. The Name attribute is used to define the name for calling the list box, and size attribute is used to specify the…
-
HTML Id Attribute
The id attribute is used to specify the unique ID for an element of the HTML document. It allocates the unique identifier which is used by the CSS and the JavaScript for performing certain tasks. Syntax Example 1: The following example describes how to use the id attribute in CSS document: Output: Example 2: The following example describes how to use the ID…
-
HTML Form Action
The action is an attribute of <form> element that specifies the url of the second web page. The second page receives the form-data from the first page after the submission of a form. Syntax This attribute specifies the URL of a web page as its value which receives the information of the form filled by the user. Example
-
HTML Date
The date is the value of the type attribute of an <input> element. It creates a calendar that allows a user to choose the date. The resulting value includes the day, month, and year. Syntax Example 1: The following example describes how to use the date in <input> tag: Output: Example 2: The following example uses the JavaScript code for displaying the date which is entered in…
-
HTML Background-color
The <bgcolor> is the attribute to set the background color of an HTML element. This attribute is used with the following tags: Syntax: Examples: The following examples use the <bgcolor> attribute in the different tags. Example 1: Use the <bgcolor> attribute with the <body> tag Output: Example 2: Use the <bgcolor> attribute with the <tr> tag Output: Example 3: The following…
-
Html <text> tag
The Html <text> tag is used to define the single-line text field on a web page. When we set the value text to the type attribute of an input element as shown in the following syntax: Syntax: Example Output: Attributes of HTML Text Tag 1. Size The size attribute is used to define the length of the text field.…
-
HTML Space Code
There are multiple ways to insert spaces between the words or characters: Using Spacebar To add a space between the words, first we have to click where we want to add a space and then press space bar. The HTML document use only one space between the words. In simple words, if we press spacebar…
-
HTML Required Attribute
The HTML Required attribute is a Boolean attribute which specifies that the input element must be filled out before the submission of form. This attribute used with the following elements: <input> We can easily use the required attribute with the <input> element as shown in the following syntax: Example: Output: <select> We can easily use the required…
-
HTML Registration Form
Following are some different types of Forms: Code 1: The following code describes how to create a simple registration Page. Output: Code 2: The following code describes how to create a responsive registration form with the use of CSS. Output:
-
HTML <Radio> Tag
The HTML <Radio> button is used to define the small circles, which are highlighted when selected. It is a form element which allows the users to select only one option from the given set of options. It is created by the type attribute of the <input> element as shown in the following syntax: Example: Output: