Category: HTML Misc
-
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. Note: In the Cascading Style sheet (CSS), we can easily select an element with the specific id by using the # symbol followed by id. Note:…
-
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 Button Disabled
The ‘disabled‘ is an attribute of <button> tag in HTML, which is used to denote that the button is disabled. It is a Boolean attribute. The disabled button cannot be used for clicking, and it appears as a grey color. Syntax Examples: The following examples are using different buttons and make them disabled. Example 1: The following…
-
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…
-
Create Html Page
You can create your first HTML page by the following steps: Step 1: Open the Text Editor In this step, we have to open any text editor such as Notepad or Notepad++ for writing an HTML code. The following image is the screenshot of the text editor (notepad++) for writing the HTML code. Step 2:…
-
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…
-
Simple HTML Pages
There are the following different examples implemented for creating the simple HTML pages using the different basic tags: Example 1: This example creates a simple page without any content, which helps in understanding how to use the Html, Head, and Body tag in the HTML page. In the following example, we have not specified the title of the…
-
Html
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 Selected Attribute
The Selected is an attribute of the <option> element, which is used to define the default selection in a dropdown-list. When any option uses this attribute, then that option should be pre-selected and displayed first, when the web page loads. Syntax Example: The following example uses the Selected attribute in the <option> tag with the Jaguar value. Output: Example 2: The following example uses the Selected attribute in the <option> tag…