Web Development Articles

Page 17 of 801

HTML DOM TableData headers Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 137 Views

The HTML DOM TableData headers property returns and modifies the value of the headers attribute of a table cell () element. The headers attribute associates data cells with their corresponding header cells, improving table accessibility for screen readers. Syntax Following is the syntax for returning the headers attribute value − object.headers Following is the syntax for setting the headers attribute value − object.headers = "header_ids" Parameters The header_ids parameter is a space-separated list of header cell IDs that describe the current data cell. Each ID should correspond to a ...

Read More

HTML DOM Textarea Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 508 Views

The HTML DOM Textarea Object represents the element in an HTML document. This object provides properties and methods to create, access, and manipulate textarea elements dynamically using JavaScript. The textarea object is commonly used for multi-line text input in forms. Creating a Textarea Object You can create a new textarea element using the document.createElement() method − Syntax document.createElement("TEXTAREA"); Once created, you can set its properties and append it to the DOM to make it visible on the page. Properties of Textarea Object The textarea object provides numerous properties to control ...

Read More

HTML DOM Textarea placeholder Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 240 Views

The HTML DOM Textarea placeholder property is used to get or set the value of the placeholder attribute of a textarea element. The placeholder provides a hint to users about what kind of information is expected in the textarea field. Syntax Following is the syntax for returning the placeholder value − textareaObject.placeholder Following is the syntax for setting the placeholder value − textareaObject.placeholder = "text" Property Value The placeholder property accepts a string value that specifies the short hint displayed in the textarea before the user enters a value. ...

Read More

HTML DOM Textarea wrap Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 237 Views

The HTML DOM Textarea wrap property gets and sets the value of the wrap attribute of a textarea element. This property controls how text wrapping behaves when the form is submitted to the server. Syntax Following is the syntax for getting the wrap property − object.wrap Following is the syntax for setting the wrap property − object.wrap = "soft" | "hard" Property Values The wrap property accepts the following values − soft − The text is wrapped visually but line breaks are not inserted when the ...

Read More

HTML option value Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 471 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 Screen height Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 237 Views

The screen.height property in JavaScript returns the total height of the user's screen in pixels. This property is part of the Screen interface and provides information about the physical dimensions of the user's display device, including any system toolbars or taskbars. Syntax Following is the syntax for the screen height property − screen.height Return Value The screen.height property returns an integer value representing the total height of the screen in pixels. This includes the entire screen area, not just the browser window. Example Following example demonstrates how to get and display ...

Read More

HTML Screen colorDepth Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 210 Views

The HTML Screen colorDepth property returns the bit depth of the color palette for displaying images in bits per pixel. This property indicates how many bits are used to represent the color of each pixel on the screen, which determines the maximum number of colors that can be displayed simultaneously. The colorDepth property is part of the Screen object and provides information about the display capabilities of the user's monitor. Common values include 8, 16, 24, and 32 bits per pixel. Syntax Following is the syntax for the colorDepth property − screen.colorDepth Return ...

Read More

HTML Screen pixelDepth Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 154 Views

The HTML Screen pixelDepth property returns the color resolution (bit depth) of the visitor's screen in bits per pixel. This property indicates how many bits are used to represent the color of each pixel, which determines the total number of colors the screen can display. The pixel depth directly affects color quality − higher values mean more colors can be displayed. Common values include 8 bits (256 colors), 16 bits (65, 536 colors), 24 bits (16.7 million colors), and 32 bits (16.7 million colors with transparency). Syntax Following is the syntax for accessing the pixelDepth property − ...

Read More

HTML Viewport meta tag for Responsive Web Design

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

The viewport meta tag is essential for creating responsive web designs that adapt to different screen sizes and devices. It controls how a web page is displayed in the browser's viewport, ensuring that your content looks good on desktops, tablets, and mobile devices. Without the viewport meta tag, mobile browsers render pages at a default desktop width (usually 980px) and then scale it down, making content appear tiny and requiring users to zoom and scroll horizontally. Syntax Following is the basic syntax for the viewport meta tag − The tag must be ...

Read More

HTML onblur Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 339 Views

The onblur event attribute in HTML is triggered when an element loses focus. This commonly occurs when a user clicks away from an input field, button, or other focusable element, or when they press the Tab key to navigate to another element. Syntax Following is the syntax for the onblur event attribute − Content The script parameter contains JavaScript code that executes when the element loses focus. Common Use Cases The onblur event is commonly used in the following scenarios − Form validation − Validate input fields when users move ...

Read More
Showing 161–170 of 8,010 articles
« Prev 1 15 16 17 18 19 801 Next »
Advertisements