HTML Articles

Page 135 of 151

TypedArray.name property in JavaScript

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 96 Views

The name property of TypedArray constructors returns a string representing the name of the typed array type. This property is available on all TypedArray constructors like Int8Array, Uint8Array, Float32Array, etc. Syntax TypedArrayConstructor.name Where TypedArrayConstructor is one of: Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, or BigInt64Array, BigUint64Array. Return Value Returns a string containing the name of the TypedArray constructor. Example TypedArray name Property var nameOfarray1 = Float32Array.name; ...

Read More

How to add rows to a table using JavaScript DOM?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 15-Mar-2026 48K+ Views

We will learn how to add a row to a table using JavaScript DOM. To achieve this, we have multiple methods. Some of them are the following. Using the insertRow() method By creating the new Element Using the insertRow() Method The insertRow() method is used to insert a new row at a specified position in the table. It creates a new element and inserts it into the table. This takes a number as a parameter that specifies the position of the table. If we do not pass any ...

Read More

How to sort an HTML list using JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 1K+ Views

Sorting an HTML list with JavaScript involves manipulating the DOM elements to reorder list items based on their content. Here are two effective approaches to accomplish this. Method 1: Using Array Methods (Recommended) This modern approach converts list items to an array, sorts them, and rebuilds the list: Sort HTML List Animal List Sorting Sort Alphabetically Zebra Elephant ...

Read More

Add oninput attribute to HTML element with JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 651 Views

You can add the oninput attribute to HTML elements using JavaScript in two ways: using addEventListener() or directly setting the oninput property. Both methods allow you to dynamically attach input event handlers to elements. Using addEventListener() (Recommended) The addEventListener() method is the modern approach for attaching event listeners: Add oninput with addEventListener Enter the value: ...

Read More

How to embed JavaScript in HTML file?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 603 Views

There are three main ways to embed JavaScript in an HTML file: inline scripts, internal scripts, and external scripts. Each method serves different purposes and has its own advantages. Method 1: Inline JavaScript You can add JavaScript directly to HTML elements using event attributes: Inline JavaScript Inline JavaScript Example Click Me Method 2: Internal JavaScript Use the tag within the HTML document to ...

Read More

How to sort an HTML table using JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 2K+ Views

Sorting HTML tables using JavaScript allows for dynamic data organization without server requests. This technique uses DOM manipulation to reorder table rows based on cell content. How Table Sorting Works The sorting algorithm compares adjacent rows and swaps them if they're in the wrong order. This bubble sort approach continues until all rows are properly sorted alphabetically. Ron Shawn Caleb Compare After ...

Read More

How to display the selected option in a dropdown list with JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 33K+ Views

In this tutorial, we will learn how to display the selected option in a dropdown list with JavaScript. A dropdown list is a switchable menu that enables users to select one item from various options. It's created using the tag and is commonly used in forms to gather user input. The DOM API functions getElementById() and querySelector() can be used to access a element and retrieve its selected value. Let's explore the different methods to display the selected option. Using selectedIndex Property The selectedIndex property returns the index of the currently selected option in ...

Read More

Create editable content in an HTML document

Bhanu Priya
Bhanu Priya
Updated on 15-Mar-2026 868 Views

The contenteditable attribute in HTML allows users to directly edit content on a webpage. This creates interactive elements that behave like text editors within the browser. Syntax The contenteditable attribute can be applied to any HTML element: Values true - Makes the element editable by the user false - Prevents the element from being edited (default behavior) Basic Example Here's a simple demonstration of editable vs non-editable content: Editable Content Demo This content is editable. Click here ...

Read More

Use HTML with jQuery to make a form

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 2K+ Views

To create forms with HTML and jQuery, you can either write static HTML forms or dynamically generate them using jQuery's DOM manipulation methods. Creating a Static HTML Form The basic approach uses standard HTML form elements: Student Details: Student Name: ...

Read More

ffmpeg settings for converting to mp4 and ogg for HTML5 video

Samual Sam
Samual Sam
Updated on 15-Mar-2026 2K+ Views

Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. HTML5 video requires specific codecs for cross-browser compatibility. MP4 with H.264/AAC works in most browsers, while OGV with Theora/Vorbis supports Firefox and other open-source browsers. Converting to MP4 Format When converting to MP4, use the H.264 video codec and AAC audio codec for maximum browser compatibility, especially IE11 and earlier versions. ffmpeg -i input.mov -vcodec h264 -acodec aac -strict -2 output.mp4 This command converts input.mov to output.mp4 with H.264 video and AAC audio codecs. MP4 with Maximum Compatibility ...

Read More
Showing 1341–1350 of 1,509 articles
« Prev 1 133 134 135 136 137 151 Next »
Advertisements