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
Front End Technology Articles
Page 88 of 652
HTML DOM Anchor pathname Property
The HTML DOM Anchor pathname property is used to set or return the pathname portion of a link's href attribute. The pathname represents the path part of the URL, which comes after the domain name and before any query string or hash fragment. Syntax Following is the syntax to set the pathname property − anchorObject.pathname = path Following is the syntax to return the pathname property − anchorObject.pathname Parameters path − A string that specifies the pathname of the URL. It should start with a forward slash (/) and ...
Read MoreHTML download Attribute
The download attribute of the element is used to set the name of the file to be downloaded when a user clicks on the hyperlink. This attribute forces the browser to download the linked resource instead of navigating to it. Syntax Following is the syntax for the download attribute − Here, filename is the suggested name for the downloaded file. If the value is omitted, the browser will use the original filename from the server. Parameters The download attribute accepts the following value − filename (optional) − A ...
Read MoreHTML width Attribute
The width attribute in HTML is specifically used with the element to control the display width of image-based submit buttons. This attribute allows you to resize images used as form submission buttons without affecting their original file dimensions. Syntax Following is the syntax for using the width attribute with input elements − Here, width represents the desired width in pixels. The height attribute is often used together to maintain proper image proportions. How It Works The width attribute is only applicable to elements. When you specify a width value, ...
Read MoreHTML href Attribute
The href attribute in HTML is used to specify the URL or path to a linked resource. It is most commonly used with anchor tags () to create hyperlinks, and with elements to reference external stylesheets, favicons, and other resources. Syntax Following is the syntax for the href attribute − Link text Here, url can be an absolute URL, relative path, or fragment identifier pointing to the target resource or location. Using href with Anchor Tags The most common use of the href attribute is with anchor tags to create ...
Read MoreHTML value Attribute
The value attribute in HTML specifies the current value for various form elements and meters. It serves different purposes depending on the element type − for form inputs, it sets the default or current value that appears in the field, while for the element, it represents the current measurement within a defined range. Syntax Following is the syntax for the value attribute − Click Me The value can be text, numbers, or other data types depending on the element and input type being used. Value Attribute with Input Elements ...
Read MoreHTML for Attribute
The for attribute of the element establishes a relationship between the calculation result and the input elements used in that calculation. This attribute helps browsers and assistive technologies understand which form controls contribute to the output value. Syntax Following is the syntax for the for attribute − result The value is a space-separated list of element IDs that participate in the calculation. These IDs must reference form controls within the same document. Parameters The for attribute accepts the following parameter − id list − A space-separated string of element ...
Read MoreHTML max Attribute
The max attribute in HTML defines the maximum value for various form input elements and the progress element. It specifies the upper limit or boundary for user input and progress indicators, ensuring data validation and proper visual representation. Syntax Following is the syntax for the max attribute − Where value represents the maximum allowed value. The data type depends on the element type (number, date, or floating-point). Elements Supporting Max Attribute The max attribute can be used with the following HTML elements − − Sets the maximum numeric ...
Read MoreHTML cite Attribute
The cite attribute in HTML is used to specify the URL or source of a quoted text, citation, or reference. It provides metadata about the source of the content, making it valuable for accessibility tools like screen readers and search engines, even though the URL itself is not visually displayed on the webpage. Syntax Following is the syntax for the cite attribute − quoted text quoted content deleted text inserted text Where URL is the web address or document reference that serves as the source of the quoted, deleted, or inserted content. Elements ...
Read MoreHTML size Attribute
The size attribute in HTML controls the number of visible options displayed in a element. When the size is set to 1 or omitted, the select element appears as a dropdown list. When size is greater than 1, it displays as a list box showing multiple options simultaneously with a scrollbar if needed. Syntax Following is the syntax for the size attribute − Option 1 Option 2 Here, number is a positive integer representing the number of visible options. If the size attribute is not ...
Read MoreHTML autofocus Attribute
The autofocus attribute in HTML automatically sets focus to a form element when the page loads. This attribute causes the browser to immediately place the cursor in the specified element, making it ready for user input without requiring a mouse click or tab navigation. The autofocus attribute is a boolean attribute introduced in HTML5 and can be used with various form elements including , , , and . Syntax Following is the syntax for the autofocus attribute − The autofocus attribute can also be written as − ...
Read More