Found 2416 Articles for HTML

HTML

AmitDiwan
Updated on 16-Sep-2019 11:33:11

335 Views

The disabled attribute of the element is used to set a disabled option from a list of options. After that, the disabled option won’t be clickable.SyntaxFollowing is the syntax −ExampleLet us now see an example to implement the disabled attribute of the element − Live Demo Impurity level of Water Impurity Level 3:2 5:3 2L 5L 10L 20L OutputThis will produce the following output. Here, the option 5:3 under the optgroup Ratio −In the above example, we have option-groups and options inside it − 3:2 5:3 ... Read More

HTML min Attribute

AmitDiwan
Updated on 16-Sep-2019 11:28:21

90 Views

The min attribute of the element is used to set the lower bound for . However, the element is used to measure data with a give range like water impurity level and it is set using the min and max attribute.SyntaxFor obvious reasons, the min value is less than the max value. The default is 0. Following is the syntax −The num above is a number in floating-point that sets the min attribute of the element.ExampleLet us now see an example to implement the min attribute of the element − Live Demo Water Levels Impurity ... Read More

Difference between an id and class in HTML

Kiran Kumar Panigrahi
Updated on 14-Sep-2023 16:09:50

27K+ Views

In HTML, both Id and Class are the element selector and are used to identify an element based on the name assign to these parameters. ID and Class selectors are the most widely used element selectors in CSS (HTML). The basic difference between ID and Class is that the ID selector is applied only to one element in a page, whereas the class selector can be applied to several elements on a single page. Read this article to find out more about "id" and "class" in HTML and how they are different from each other. What is ID in ... Read More

HTML

AmitDiwan
Updated on 16-Sep-2019 11:16:41

145 Views

The for attribute of the element is used to set an element with a label.SyntaxFollowing is the syntax −Above, id is the associated element id.ExampleLet us now see an example to implement the for attribute of element − Live Demo Last Semester Results Result Student: Subject: Rank: OutputThis will produce the following output −In the above example, we have a form with some fields − Result Student: Subject: Rank: We have set the label for the field using for attribute of the element, ... Read More

HTML disabled Attribute

AmitDiwan
Updated on 16-Sep-2019 11:07:23

179 Views

The disabled attribute of the element is used to disable element. When an element is disabled, it becomes unclickable. For obvious reasons, the disabled input element won’t get submitted.SyntaxFollowing is the syntax −Let us now see an example to implement the disabled attribute of the element −Example Live Demo Details These are the new details... New Details: Player: Rank: Email: Reporting Time: OutputThis will produce the following output wherein we have disabled one of the input element “Player” −In the above example, we have four fields −Player: ... Read More

HTML Block and Inline Elements

AmitDiwan
Updated on 16-Sep-2019 09:19:06

382 Views

Block ElementsThe block elements appear on a screen as if they have a line break before and after them. They also take up the entire available width. Some of the block elements include, to , , , , , , , , etc.ExampleLet us see an example of one of the block element , , , etc − Live Demo Coding Ground Compilers for Programming Languages and Web Technologies Click on the individual links to work on online compilers: Java | PHP | jQuery | C | C++ | AngularJS We also have complier for JS ... Read More

HTML DOM Input Reset form property

AmitDiwan
Updated on 22-Aug-2019 12:59:34

161 Views

The HTML DOM Input Reset form property is used for returning the form reference that contains the given reset button. If the reset button is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input Reset form property.resetObject.formExampleLet us look at an example for the Input Reset form property − Live Demo Input reset form Property UserName: Location: Get the form id by clicking on the below button GET FORM    function formId() {       var P=document.getElementById("RESET1").form.id;       ... Read More

HTML DOM Input Reset disabled property

AmitDiwan
Updated on 22-Aug-2019 12:55:57

159 Views

The HTML DOM Input reset disabled property is used for setting or returning if the reset button should be disabled or not. It uses boolean values, with true representing the reset button should be disabled and false otherwise. The disabled property is set to false by default. The disabled element is greyed out by default and is unclickable.SyntaxFollowing is the syntax for −Setting the disabled property −resetObject.autofocus = true|falseHere, true=reset button is disabled and false=the reset button is not disabled. It is false by default.ExampleLet us look at an example for the Input reset disabled property − Live Demo ... Read More

HTML DOM Input Reset autofocus property

AmitDiwan
Updated on 22-Aug-2019 12:52:42

147 Views

The HTML DOM Input Reset autofocus property is associated with the HTML element’s autofocus attribute. This property is used for setting or returning if the reset button should be automatically focused when the page loads or not.SyntaxFollowing is the syntax for −Setting the autofocus property −resetObject.autofocus = true|falseHere, true represents that the reset button should get focus and false represents otherwise. It is set to false by default.ExampleLet us look at an example for the Input Reset autofocus property − Live Demo Reset Autofocus property UserName: Location: Get the reset ... Read More

HTML DOM Input Range value property

AmitDiwan
Updated on 22-Aug-2019 12:46:44

737 Views

The HTML DOM Input range value property is associated with the input element having type=”range” and the value attribute. It is used to return the value of slider control value attribute or to set it. The value attribute can be the default value or the value set by dragging the slider.SyntaxFollowing is the syntax for −Setting the value property −rangeObject.value = text;Here, text is used for specifying the value for the range slider control.ExampleLet us look at an example for the input range value property − Live Demo Input range Value property VOLUME Get the above element ... Read More

Advertisements