Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
HTML Articles
Page 53 of 151
HTML Window alert( ) Method
The HTML window alert() method displays a simple alert dialog box with a specified message and an OK button. This method is part of the JavaScript Window object and provides a way to show important information or notifications to users that require acknowledgment before continuing. Syntax Following is the syntax for the window alert() method − alert(message); Parameters The alert() method accepts one parameter − message − A string that specifies the text to display in the alert dialog box. If a non-string value is passed, it will be converted to ...
Read MoreHTML Window atob( ) Method
The HTML window atob() method is used to decode a Base64 encoded string. It is the counterpart to the btoa() method, which encodes strings into Base64 format. The atob stands for "ASCII to Binary" and converts Base64 encoded data back to its original string format. Syntax Following is the syntax for the atob() method − window.atob(encodedString) Parameters The atob() method accepts one parameter − encodedString − A Base64 encoded string that needs to be decoded. This must be a valid Base64 string, otherwise the method will throw a DOMException. ...
Read MoreHTML novalidate Attribute
The HTML novalidate attribute specifies that form data should not be validated when the form is submitted. This boolean attribute disables the browser's built-in validation for form controls like required, pattern, min, max, and input type validations. Syntax Following is the syntax for the novalidate attribute − The novalidate attribute is a boolean attribute, meaning its presence alone enables the functionality. You can write it as novalidate, novalidate="", or novalidate="novalidate". How It Works When the novalidate attribute is present on a form element, the browser skips ...
Read MoreHTML Navigator appCodeName Property
The HTML navigator appCodeName property returns the browser's code name, which is a string identifier used internally by the browser. This property is part of the Navigator interface and provides information about the user's browser application. Syntax Following is the syntax for accessing the appCodeName property − navigator.appCodeName Return Value The property returns a string representing the code name of the browser. For most modern browsers, this property typically returns "Mozilla" for historical compatibility reasons, regardless of the actual browser being used. Browser Code Names Here are the common values returned ...
Read MoreHTML Navigator product Property
The navigator.product property in HTML is a read-only property that returns the browser's engine name. In modern browsers, this property typically returns "Gecko" regardless of the actual browser engine being used. Syntax Following is the syntax for the navigator product property − navigator.product Return Value The property returns a string representing the browser engine name. For compatibility reasons, most modern browsers return "Gecko" even if they don't use the Gecko engine. Example Following example demonstrates how to access the navigator product property − ...
Read MoreHTML Window length Property
The HTML Window length property returns the number of elements (frames) in the current window or document. This property is read-only and provides a count of all frame elements present in the current context. Syntax Following is the syntax for the Window length property − window.length Return Value The window.length property returns a number representing the total count of iframe elements in the current document. If no iframes are present, it returns 0. Example − Single Iframe Following example demonstrates the Window length property with one iframe element − ...
Read MoreHTML Window innerHeight Property
The HTML Window innerHeight property returns the height of the browser window's content area in pixels, excluding toolbars, scrollbars, and other browser UI elements. This property is commonly used in responsive web design and dynamic layout calculations. Syntax Following is the syntax for accessing the innerHeight property − window.innerHeight Return Value The innerHeight property returns an integer representing the height of the browser window's content area in pixels. This value changes when the user resizes the browser window or when the browser's UI elements (like toolbars) are toggled. Basic Example Following ...
Read MoreHTML Window name Property
The HTML Window name property is used to get or set the name of the browser window. This property is particularly useful for identifying windows in multi-window applications, frame targeting, and inter-window communication. Syntax Following is the syntax for getting the window name − window.name Following is the syntax for setting the window name − window.name = "windowName" Return Value The window.name property returns a string representing the name of the window. If no name has been set, it returns an empty string (""). Getting Window Name ...
Read MoreHow to Allow the File Input Type to Accept Only Image Files
The tag in HTML creates an input control that accepts user input. The type attribute determines the kind of input field displayed, such as text fields, checkboxes, buttons, or file uploads. When working with file uploads, you often need to restrict the allowed file types to only accept image files. The element by default accepts all file types, but you can limit it to images using the accept attribute or JavaScript validation. This ensures users can only select image files from their device. Syntax Following is the basic syntax for file input − ...
Read MoreHow to Create a Hidden Div without a Line Break or Horizontal Space?
The HTML div element serves as a container for grouping related content on web pages. While div elements are normally visible and take up space in the document layout, there are situations where you need to hide a div without creating line breaks or consuming horizontal space. Understanding how to properly hide div elements is crucial for creating dynamic web layouts, implementing show/hide functionality, and managing space-efficient designs. Different hiding methods produce different results in terms of space consumption and layout impact. HTML Div Element Basics The tag is a block-level container element that groups related ...
Read More