AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 239 of 840

HTML DOM li value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 221 Views

The HTML DOM li value property allows you to get or set the value attribute of a element. This property is particularly useful when working with ordered lists where you need to control the numbering sequence or create custom list item values. Syntax Following is the syntax for getting the value attribute − liObject.value Following is the syntax for setting the value attribute − liObject.value = "string" Parameters string − A string value that represents the numeric value for the list item. This must be a ...

Read More

Is wrapping a div inside an anchor tag valid code?

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 7K+ Views

Yes, wrapping a div inside an anchor tag is valid HTML5 code. Prior to HTML5, this was not allowed, but HTML5 specifications permit block-level elements like to be nested inside tags, making entire sections clickable. Syntax Following is the basic syntax for wrapping a div inside an anchor tag − Content This makes the entire div element clickable as a single link. Basic Example Following example demonstrates a simple div wrapped inside an anchor tag − Div ...

Read More

HTML DOM Form target property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 338 Views

The HTML DOM Form target property is used to specify where the response should be displayed after form data has been submitted. It controls whether the form response opens in the current window, a new tab, a new window, or a specific frame. This property sets or retrieves the value of the form's target attribute. Syntax Following is the syntax for getting the target property − var target = formObject.target; Following is the syntax for setting the target property − formObject.target = "_blank|_self|_parent|_top|framename"; Parameters The target property accepts the ...

Read More

How to make horizontal line with words in the middle using CSS?

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 3K+ Views

With CSS, we can create horizontal lines with content in the middle using various techniques. This design pattern is commonly used for section dividers, decorative headings, and visual separators in web layouts. We can place text, headings, or even images between horizontal lines for an elegant visual effect. Syntax The most common approach uses CSS flexbox with pseudo-elements ::before and ::after − .element { display: flex; flex-direction: row; } .element::before, .element::after { content: ""; flex: 1 1; border-bottom: 1px solid color; ...

Read More

HTML DOM Link href Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 324 Views

The HTML DOM Link href property is used to set or return the URL/path of a linked document. This property is commonly used with elements to dynamically change stylesheets, favicons, or other linked resources on a webpage. Syntax Following is the syntax for getting the href attribute value − linkObject.href Following is the syntax for setting the href attribute value − linkObject.href = string Parameters The string parameter can be the following values − Value Type Description Absolute path It ...

Read More

HTML DOM fullscreenElement property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 210 Views

The HTML DOM fullscreenElement property returns the element that is currently displayed in fullscreen mode on the page. If no element is in fullscreen mode, it returns null. Syntax Following is the syntax for the fullscreenElement property − document.fullscreenElement Return Value The property returns − Element object − The DOM element currently displayed in fullscreen mode. null − If no element is currently in fullscreen mode. Browser Compatibility Due to different browser implementations, vendor prefixes are required for cross-browser compatibility − Browser Property Name ...

Read More

HTML DOM Link rel Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 179 Views

The HTML DOM Link rel property sets or returns the relationship between the current document and the linked document. This property corresponds to the rel attribute of the element and specifies how the linked resource relates to the current document. Syntax Following is the syntax for getting the rel attribute value − linkObject.rel Following is the syntax for setting the rel attribute to a value − linkObject.rel = valueString Parameters valueString − A string that specifies the relationship between the current document and the linked document. It can ...

Read More

HTML option value Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 480 Views

The HTML option value attribute defines the value that will be sent to the server when a form is submitted. The value attribute specifies what data is transmitted for each option in a select dropdown, which may differ from the visible text displayed to users. Syntax Following is the syntax for the option value attribute − Display Text Where text is the value sent to the server, and Display Text is what users see in the dropdown. How It Works When a user selects an option and submits the form, the browser ...

Read More

HTML DOM Ol reversed Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 215 Views

The HTML DOM Ol reversed property sets or returns whether an ordered list should display its numbering in descending order (from highest to lowest) instead of the default ascending order (from lowest to highest). Syntax Following is the syntax for returning the reversed property − olObject.reversed Following is the syntax for setting the reversed property − olObject.reversed = booleanValue Parameters The booleanValue parameter can be one of the following − Value Description true Sets the list numbering in descending order (highest ...

Read More

HTML onpaste Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 301 Views

The HTML onpaste attribute is an event handler that triggers when a user pastes content into an HTML element. This event occurs when content is pasted using Ctrl+V, right-click paste, or any other paste operation. Syntax Following is the syntax for the onpaste attribute − Content Where script is the JavaScript code to execute when the paste event occurs. Parameters script − JavaScript code or function to execute when content is pasted into the element. Commonly Used Elements The onpaste attribute is most commonly used with form elements ...

Read More
Showing 2381–2390 of 8,392 articles
« Prev 1 237 238 239 240 241 840 Next »
Advertisements