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 90 of 151
HTML 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 MoreHTML cite Attribute
The cite attribute in HTML is used to specify the source URL of a quotation or referenced content. It is commonly used with the and elements to provide a machine-readable reference to the original source, though it is not visually displayed by browsers. Syntax Following is the syntax for the cite attribute with the element − Quoted content here Following is the syntax for the cite attribute with the element − Inline quoted content Here, URL is the web address or ...
Read MoreHTML rel Attribute
The rel attribute of the element specifies the relationship between the current document and the linked document. This attribute was introduced in HTML5 for the element and helps define the semantic relationship between clickable regions in image maps and their target destinations. Syntax Following is the syntax for the rel attribute in the element − The value can be one or more space-separated keywords that define the relationship type. Rel Attribute Values The rel attribute accepts the following values that define different types of relationships − ...
Read MoreHTML target Attribute
The target attribute of the element specifies where to display the response received after submitting the form. It controls whether the form response opens in the same window, a new tab, a specific frame, or the parent window. Syntax Following is the syntax for the target attribute − Target Attribute Values The target attribute accepts the following predefined values − _blank − Opens the form response in a new window or tab. _self − Opens the form response in the same frame (default behavior). _parent − Opens the form ...
Read More