HTML Articles

Page 39 of 151

HTML DOM Link type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 167 Views

The HTML DOM Link type property sets or returns the MIME type of a linked document. This property corresponds to the type attribute of HTML elements and helps browsers understand how to handle the linked resource. Syntax Following is the syntax for getting the type property − linkObject.type Following is the syntax for setting the type property − linkObject.type = value Parameters The value parameter represents a string specifying the MIME type of the linked document. Common valid values include − text/css − For CSS stylesheets ...

Read More

HTML DOM Location hostname Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 419 Views

The Location hostname property is part of the HTML DOM Location object that allows you to get or set the hostname portion of the current URL. The hostname is the domain name part of a URL, excluding the protocol, port number, and path. Syntax Following is the syntax to get the hostname property − location.hostname Following is the syntax to set the hostname property − location.hostname = hostname Return Value The hostname property returns a string representing the domain name of the URL. For example, if the URL is ...

Read More

HTML DOM Location port Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 151 Views

The HTML DOM Location port property returns or sets the port number of the current URL. If no port is explicitly specified in the URL, it returns an empty string. Common default ports (80 for HTTP, 443 for HTTPS) are typically not displayed unless explicitly set. Syntax Following is the syntax to get the port number − location.port Following is the syntax to set the port number − location.port = portNumber Return Value The location.port property returns a string representing the port number. If no port is specified, it ...

Read More

HTML DOM Location reload() method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 359 Views

The HTML DOM Location reload() method is used to reload the current document, providing the same functionality as the browser's reload button. This method re-renders the entire page, either from the server or browser cache depending on the parameter passed. Syntax Following is the syntax for the location.reload() method − location.reload(forceGetParameter) Parameters The forceGetParameter is an optional boolean parameter that determines how the page is reloaded − forceGetParameter Details true Forces the page to reload from the server, bypassing the browser cache. false ...

Read More

How to Move Image in HTML?

Way2Class
Way2Class
Updated on 16-Mar-2026 20K+ Views

Moving images in HTML can be achieved through various methods, from traditional HTML tags to modern CSS properties and JavaScript. An image is added to a web page using the HTML tag, which is a self-closing element that simply includes attributes. While the HTML tag was previously used to create scrolling images, it is now deprecated in HTML5. Modern web development favors CSS properties and JavaScript for more precise control over image positioning and movement. Syntax The basic syntax for adding an image in HTML is − To move images, ...

Read More

HTML DOM Anchor type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 198 Views

The HTML DOM Anchor type property sets or retrieves the value of the type attribute of an anchor element. This property specifies the MIME type of the linked resource, providing a hint to the browser about the content type it can expect when following the link. The type attribute was introduced in HTML5 and serves as a suggestion to help browsers optimize how they handle the linked resource. It contains a single MIME (Multipurpose Internet Mail Extensions) type value such as text/html, application/pdf, or image/jpeg. Syntax Following is the syntax for getting the type property − ...

Read More

How to perform a real time search and filter on a HTML table?

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 2K+ Views

When dealing with large datasets in web applications, implementing search functionality in HTML tables significantly improves user experience. Instead of manually scanning through hundreds or thousands of rows, users can quickly filter table data by typing search terms. This article demonstrates how to implement real-time search and filter functionality using both vanilla JavaScript and jQuery. Syntax Following is the basic syntax for implementing table search using JavaScript − if (td) { if (txtValue.toLowerCase().indexOf(search_value) > -1) { tr[i].style.display = ""; } else { ...

Read More

How to place Font Awesome icon to input field?

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 4K+ Views

In many cases, developers require to place an icon inside the text input or particular HTML element. For example, when creating a form containing multiple inputs, placing icons related to each form field inside the input can create a better UI and more attractive design for the application. In this tutorial, we will use the Font Awesome library to add icons to web pages and manipulate CSS code to place these icons inside input fields. Font Awesome provides scalable vector icons that can be customized with CSS properties like size, color, and positioning. Syntax Following is the ...

Read More

How to prevent browser to remember password in HTML?

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 1K+ Views

Browser password storage is a common feature that saves login credentials for user convenience. However, this automatic behavior can pose security risks and privacy concerns, especially on shared computers or when handling sensitive applications. The browser stores form data and passwords in local storage, cookies, or browser-specific password managers. While password suggestions are helpful for regular websites, they should be disabled for sensitive applications like banking, admin panels, or any system where unauthorized access could cause harm. This tutorial demonstrates how to prevent browsers from remembering passwords using HTML attributes and JavaScript techniques. Using the Autocomplete Attribute ...

Read More

How to prevent dragging of ghost image?

Mohit Panchasara
Mohit Panchasara
Updated on 16-Mar-2026 1K+ Views

By default, HTML elements including images display a ghost image when dragged by users. This ghost image is a semi-transparent copy that follows the cursor during the drag operation. However, for certain images like logos, icons, or decorative elements, this dragging behavior may be undesirable as it can confuse users or interfere with the intended user experience. In this tutorial, we will learn various methods to prevent the dragging of ghost images using the draggable attribute, JavaScript, and jQuery. What is a Ghost Image? When you drag an image element, the browser creates a semi-transparent copy called ...

Read More
Showing 381–390 of 1,509 articles
« Prev 1 37 38 39 40 41 151 Next »
Advertisements