Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
HTML Articles
Page 91 of 151
HTML target Attribute
The target attribute of the element specifies where to open the linked document when a clickable area within an image map is activated. It determines whether the link opens in the current window, a new window, or a specific frame. Syntax Following is the syntax for the target attribute − Target Attribute Values The target attribute accepts the following values − _blank − Opens the linked document in a new window or tab. _self − Opens the linked document in the same frame or window (default ...
Read MoreChange Background color of a web page using onmouseover property
The onmouseover property allows you to execute a script when the mouse pointer is moved onto an HTML element. Combined with the HTML DOM backgroundColor property, it enables dynamic background color changes to create interactive web pages. Syntax Following is the syntax for the onmouseover property − Content Following is the syntax for changing background color using JavaScript − document.body.style.backgroundColor = "colorValue"; Basic Background Color Change The most common approach is to use the onmouseover event directly on an element to change the entire page background color when hovering. ...
Read MoreHTML type Attribute
The type attribute of the element specifies the MIME (Multipurpose Internet Mail Extensions) type of the linked resource. This attribute provides a hint to the browser about what type of content to expect when the user clicks on the area, helping optimize the user experience. Syntax Following is the syntax for the type attribute − Where media_type is a valid MIME type such as image/png, text/html, application/pdf, etc. Common MIME Types Following are some commonly used MIME types with the area element − MIME Type Description ...
Read MoreHTML autocomplete Attribute
The autocomplete attribute in HTML controls whether the browser should automatically fill in form fields based on previously entered values. When set to on, browsers provide suggestions from the user's input history, making form completion faster and more convenient. Syntax Following is the syntax for the autocomplete attribute − For individual form controls, the syntax is − Parameters The autocomplete attribute accepts the following values − on − Enables autocomplete for the form or input element. The browser will suggest previously ...
Read MoreHTML DOM Address Object
The HTML DOM Address Object represents the element in HTML. The element is used to define contact information for the author or owner of a document or article. The Address Object provides properties and methods to create, access, and manipulate address elements using JavaScript. Syntax To create an Address Object using JavaScript − document.createElement("address") To access an existing address element − document.getElementById("addressId") Properties The Address Object supports all standard HTML DOM properties like innerHTML, textContent, style, and event handlers. It inherits properties from the HTMLElement interface. ...
Read MoreHTML disabled Attribute
The disabled attribute in HTML is used to disable form elements, making them unclickable and unselectable. When applied, the element becomes inactive and cannot be interacted with by users. This attribute is commonly used with form controls like buttons, input fields, select options, and option groups. Syntax Following is the syntax for the disabled attribute − Or with a value − Elements Supporting Disabled Attribute The disabled attribute can be applied to the following HTML elements − − Disables button elements − Disables ...
Read MoreHTML DOM Anchor hash Property
The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The anchor part is the portion of the URL that comes after the # symbol, which is used for navigation to specific sections within a page. Syntax Following is the syntax to set the hash property − anchorObject.hash = anchor_part Above, anchor_part is the anchor part of the URL including the # symbol. Following is the syntax to return the hash property − anchorObject.hash Return Value The hash ...
Read MoreHTML DOM Input Button form Property
The HTML DOM Input Button form property returns a reference to the form element that contains the input button. This property is read-only and provides access to the parent form of a button element, enabling you to identify which form the button belongs to and access form-level properties or methods. Syntax Following is the syntax for accessing the form property − buttonElement.form Return Value The form property returns a reference to the element that contains the button. If the button is not inside a form, it returns null. Example − Basic ...
Read MoreHTML DOM Input Button Object
The HTML DOM Input Button Object represents an HTML input element with the type attribute set to "button". This object provides programmatic access to button elements, allowing you to create, modify, and interact with buttons dynamically using JavaScript. The Input Button Object is used to create interactive buttons that can trigger JavaScript functions when clicked. Unlike submit buttons, these buttons do not automatically submit forms but instead execute custom JavaScript code. Syntax Following is the syntax to create an Input Button Object dynamically − var newButton = document.createElement("INPUT"); newButton.setAttribute("type", "button"); To access an ...
Read MoreHTML DOM Input Checkbox defaultChecked Property
The HTML DOM input checkbox defaultChecked property returns the default value of the checked attribute of a checkbox element. This property reflects whether the checkbox was initially checked when the page loaded, regardless of its current state. Syntax Following is the syntax for getting the defaultChecked property − checkboxObject.defaultChecked This property returns a boolean value − true − if the checkbox was initially checked (had the checked attribute) false − if the checkbox was initially unchecked Understanding defaultChecked vs checked The defaultChecked property differs from the checked property − ...
Read More