HTML Articles

Page 11 of 151

HTML DOM Location search Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 198 Views

The Location search property returns or sets the query string portion of a URL, including the leading question mark (?). This property allows you to read the search parameters from the current URL or programmatically modify them. Syntax Following is the syntax for getting the search property − location.search Following is the syntax for setting the search property − location.search = searchString Parameters searchString − A string representing the query parameters, including the leading question mark. For example: "?name=john&age=25" Return Value Returns a string containing the query ...

Read More

HTML DOM Anchor rel Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 200 Views

The HTML DOM Anchor rel property returns or sets the rel attribute of an anchor element. The rel attribute specifies the relationship between the current document and the linked document, providing semantic meaning to links for browsers, search engines, and assistive technologies. Syntax Following is the syntax to return the rel property − anchorObject.rel Following is the syntax to set the rel property − anchorObject.rel = "value" Parameters The value parameter accepts a string containing one or more space-separated link types. Common values include − nofollow − ...

Read More

HTML DOM Anchor search Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 189 Views

The HTML DOM Anchor search property returns or sets the query string part of an anchor element's href attribute. The query string is the portion of a URL that comes after the question mark (?) and contains parameters passed to the server, typically used in GET requests. Syntax Following is the syntax for returning the search property − anchorObject.search Following is the syntax for setting the search property − anchorObject.search = querystring Parameters querystring − A string representing the query string portion of the URL, including the ...

Read More

HTML DOM Anchor target Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 386 Views

The HTML DOM anchor target property specifies where to open the linked document when a user clicks on an anchor element. This property corresponds to the target attribute in HTML and can be accessed or modified using JavaScript. The target property can have the following values − _blank − Opens the linked document in a new window or tab. _self − Opens the linked document in the same frame (this is the default). _parent − Opens the linked document in the parent frame. _top − Opens the linked document in the full body of the window. framename ...

Read More

HTML DOM Anchor username Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 205 Views

The HTML DOM anchor username property is used to set or return the username portion of a URL in an anchor element's href attribute. The username appears in URLs that use basic authentication format: protocol://username:password@hostname. Syntax Following is the syntax for returning the username property − anchorObject.username Following is the syntax for setting the username property − anchorObject.username = "newUsername" Parameters The username property accepts a string value representing the username portion of the URL. When setting this property, it modifies only the username part while keeping the rest ...

Read More

HTML DOM AnimationEvent

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 318 Views

The HTML DOM AnimationEvent is a JavaScript object that handles events occurring during CSS animations. It provides detailed information about animation-related events and offers greater control over CSS animations by describing which events triggered specific animations. Properties The AnimationEvent object contains three main properties − Property Description animationName Returns the name of the CSS animation being executed. elapsedTime Returns the time elapsed since the animation started running, measured in seconds. pseudoElement Returns the name of the pseudo-element where the animation occurs (e.g., ::before, ::after, ::first-line). Returns ...

Read More

HTML DOM Base href Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 331 Views

The HTML DOM Base href property is used to get or set the value of the href attribute of the element. The tag specifies the base URL for all relative URLs in an HTML document, and there can be a maximum of one tag per document. Syntax Following is the syntax for setting the href property − baseObject.href = URL Following is the syntax for returning the href property − baseObject.href Here, URL is a string representing the base URL for relative URLs in the document. ...

Read More

HTML DOM cite object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 167 Views

The HTML DOM cite object is associated with the HTML element. The element is used to reference creative works like books, movies, paintings, songs, or research papers. When rendered, browsers typically display cite content in italics to distinguish it from regular text. Syntax Following is the syntax for creating a cite object using JavaScript − var citeElement = document.createElement("CITE"); Following is the syntax for the HTML element − Title of creative work Properties and Methods The cite object inherits all standard HTML DOM element properties and ...

Read More

HTML DOM console.assert() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 186 Views

The HTML DOM console.assert() method is used to write an error message to the console only if the first expression (assertion) evaluates to false. This method is particularly useful for debugging and testing conditions during development. If the assertion is true, nothing happens; if it's false, the specified message appears in the browser's developer console. Syntax Following is the syntax for the console.assert() method − console.assert(assertion, message, ...optionalParams); Parameters The console.assert() method accepts the following parameters − assertion − A boolean expression or any value that can be evaluated as truthy ...

Read More

HTML DOM console.error() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 177 Views

The HTML DOM console.error() method is used for writing an error message to the browser's console. This method is very useful for testing and debugging purposes, allowing developers to log error information that can be viewed in the browser's developer tools. Syntax Following is the syntax for console.error() method − console.error(message) Parameters The console.error() method accepts the following parameter − message − A JavaScript string, object, or any value that needs to be displayed as an error message in the console. This parameter is required. Return Value ...

Read More
Showing 101–110 of 1,509 articles
« Prev 1 9 10 11 12 13 151 Next »
Advertisements