Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML href Attribute

Ankith Reddy
Ankith Reddy
Updated on 16-Mar-2026 343 Views

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 More

HTML DOM Input Number required Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 194 Views

The HTML DOM Input Number required property sets or returns whether a number input field must be filled out before submitting the form. This property corresponds to the HTML required attribute and enables client-side form validation. Syntax Following is the syntax for returning the required property − object.required Following is the syntax for setting the required property − object.required = true | false Property Values The required property accepts the following boolean values − true − The number input field is required and must be filled before ...

Read More

HTML DOM Input Number placeholder Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 295 Views

The HTML DOM Input Number placeholder property returns and modifies the value of the placeholder attribute of a number input field. The placeholder provides a hint to the user about what kind of value is expected in the input field. Syntax Following is the syntax for returning the placeholder value − object.placeholder Following is the syntax for modifying the placeholder value − object.placeholder = "text" Parameters text − A string that specifies the placeholder text to display in the number input field. Return Value The ...

Read More

How do we set the visible number of lines in a text area in HTML?

Yaswanth Varma
Yaswanth Varma
Updated on 16-Mar-2026 5K+ Views

This article will teach you how to set the visible number of lines in a textarea in HTML. The HTML element is useful for multi-line editing control and allows the user to enter a sizeable amount of free-form text. The rows attribute determines how many lines of text are visible without scrolling. Syntax Following is the syntax to set the visible number of lines in textarea − Content The rows attribute specifies the number of visible text lines for the control. It determines the textarea's visible height in terms of character lines. The ...

Read More

HTML DOM Input Number step Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 182 Views

The HTML DOM Input Number step property sets and retrieves the value of the step attribute for number input fields. The step attribute defines the legal number intervals for the input field, controlling how much the value increases or decreases when using the input's increment/decrement arrows. Syntax Following is the syntax for getting the step value − object.step Following is the syntax for setting the step value − object.step = "number" Parameters The step property accepts a string that represents a positive number. Common values include: "1" ...

Read More

Enable an extra set of restrictions for the content in an in HTML?

Giri Raju
Giri Raju
Updated on 16-Mar-2026 68 Views

The sandbox attribute in HTML enables an extra set of restrictions for the content loaded in an element. This attribute acts as a security feature that applies various limitations to the embedded content, preventing potentially harmful actions like form submissions, script execution, or navigation to other pages. The sandbox attribute provides a way to isolate iframe content and control what the embedded page can do, making it safer to embed third-party content on your website. Syntax Following is the syntax for the sandbox attribute − The sandbox attribute can be used ...

Read More

HTML value Attribute

Ankith Reddy
Ankith Reddy
Updated on 16-Mar-2026 187 Views

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 More

HTML DOM Input Number defaultValue Property

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 150 Views

The HTML DOM input number defaultValue property returns and modifies the default value of an input field with type="number" in an HTML document. This property represents the initial value specified in the HTML value attribute, which remains unchanged even when the user modifies the input field. Syntax Following is the syntax for returning the default value − object.defaultValue Following is the syntax for modifying the default value − object.defaultValue = "number" Return Value The defaultValue property returns a string representing the default value of the number input field. If ...

Read More

HTML DOM Input Number max Property

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 228 Views

The HTML DOM input number max property returns and modifies the value of the max attribute of an input field with type="number". This property sets the maximum allowed value for the number input field. Syntax Following is the syntax for getting the max value − object.max Following is the syntax for setting the max value − object.max = "number" Parameters The max property accepts a single parameter − number − A string representing the maximum value allowed for the number input. It can be an integer or ...

Read More

How to specify that the styles only apply to this element's parent element and that element's child elements in HTML?

seetha
seetha
Updated on 16-Mar-2026 318 Views

The scoped attribute was an HTML5 feature designed to limit CSS styles to only apply within a specific parent element and its child elements. However, this attribute was removed from the HTML specification and is no longer supported by modern browsers. Syntax The original syntax for the scoped attribute was − /* CSS rules here would only apply to parent and children */ Why Scoped Was Removed The scoped attribute was removed from HTML5 due to implementation complexity and lack of browser support. Only Firefox provided partial support, ...

Read More
Showing 13641–13650 of 61,297 articles
Advertisements