Articles on Trending Technologies

Technical articles with clear explanations and examples

Role of CSS :required Selector

Sreemaha
Sreemaha
Updated on 15-Mar-2026 256 Views

The CSS :required pseudo-class selector is used to target form elements that have the required attribute. This selector allows you to apply specific styles to required form fields, helping users identify which fields are mandatory to fill out. Syntax :required { /* CSS properties */ } input:required { /* Styles for required input elements */ } Example: Styling Required Input Fields The following example demonstrates how to style required input fields with a distinctive background color − ...

Read More

Role of CSS :read-write Selector

usharani
usharani
Updated on 15-Mar-2026 161 Views

The CSS :read-write pseudo-class selector targets form elements that are both readable and writable by the user. This selector applies styles specifically to input fields and textareas that can be edited, excluding read-only elements. Syntax :read-write { /* CSS properties */ } Elements Targeted The :read-write selector matches: elements without the readonly attribute elements without the readonly attribute Elements with contenteditable="true" Example The following example demonstrates how :read-write styles only the editable input field − ...

Read More

C Program for N-th term of Arithmetic Progression series

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 9K+ Views

Given 'a' the first term, 'd' the common difference and 'n' for the number of terms in a series. The task is to find the nth term of the Arithmetic Progression series. Arithmetic Progression (AP) is a sequence of numbers where the difference between any two consecutive terms is constant. This constant difference is called the common difference. For example, if we have first term a = 5, common difference d = 2, and we want to find the 4th term, the series would be: 5, 7, 9, 11. So the 4th term is 11. Syntax ...

Read More

C Program to calculate the Round Trip Time (RTT)

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 1K+ Views

Round Trip Time (RTT) is the time required to send a network request to a server and receive a response back. In C programming, we can calculate RTT by measuring the time before and after making a network request or system call. Syntax #include clock_t start_time = clock(); // Network operation or system call clock_t end_time = clock(); double rtt = ((double)(end_time - start_time)) / CLOCKS_PER_SEC; What is Round Trip Time? Round Trip Time (RTT) consists of − Transmission time − Time to send the request Propagation delay − Time for ...

Read More

Style elements with a "readonly" attribute with CSS

George John
George John
Updated on 15-Mar-2026 2K+ Views

The CSS :read-only pseudo-class selector is used to style form elements that have the readonly attribute. This selector targets input fields and textareas that users cannot modify. Syntax input:read-only { /* CSS properties */ } textarea:read-only { /* CSS properties */ } /* Target all read-only elements */ :read-only { /* CSS properties */ } Example: Styling Read-Only Input Fields The following example demonstrates how to apply different styles to read-only and editable input fields − ...

Read More

Role of CSS : read-only Selector

vanithasree
vanithasree
Updated on 15-Mar-2026 206 Views

The CSS :read-only selector is used to select form elements that have the readonly attribute set. This pseudo-class targets input fields and textarea elements that users cannot modify, making it useful for styling non-editable form fields differently from editable ones. Syntax :read-only { /* styles */ } input:read-only { /* styles for read-only input elements */ } textarea:read-only { /* styles for read-only textarea elements */ } Example: Basic Read-Only Styling The following example demonstrates how to style read-only input ...

Read More

C Program to Change RGB color model to HSV color model

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 3K+ Views

Given RGB color range in form of integers; the task is to find its appropriate HSV color by converting the RGB color range. This conversion helps translate between the hardware-oriented RGB model and the more intuitive HSV model used in graphics and design applications. What is RGB Color Model RGB color model comprised of three colors Red, Green and Blue. RGB model is a color model which is widely used in the display technologies; it is an additive model in which we add these three colors with different intensities to produce millions of different colors on a display ...

Read More

Style elements with a value outside a specified range with CSS

seetha
seetha
Updated on 15-Mar-2026 240 Views

The CSS :out-of-range pseudo-class selector is used to style elements when their value is outside the specified min and max range. This selector only applies to input elements that have range limitations defined. Syntax input:out-of-range { /* styles */ } Example: Styling Out-of-Range Input The following example demonstrates how to style a number input when the value is outside the specified range − input:out-of-range { border: 3px dashed orange; ...

Read More

C Program to convert a given number to words

Sunidhi Bansal
Sunidhi Bansal
Updated on 15-Mar-2026 12K+ Views

In C programming, converting numbers to words is a common problem that involves breaking down a number into its place values and mapping each digit to its corresponding word representation. This program converts numbers from 0 to 9999 into their English word equivalents. Syntax void convert(char *num); Algorithm Overview The conversion process involves these key steps − Parse the input string to determine its length Use arrays to store word representations for different place values Process digits from left to right based on their position Handle special cases for numbers 10-19 and ...

Read More

Role of CSS :optional Selector

radhakrishna
radhakrishna
Updated on 15-Mar-2026 253 Views

The CSS :optional pseudo-class selector is used to target form elements that do not have the required attribute. This selector is particularly useful for styling optional form fields differently from required ones. Syntax :optional { /* CSS properties */ } /* Target specific optional elements */ input:optional { /* CSS properties */ } Example: Styling Optional Form Fields The following example demonstrates how to style optional input fields with a light blue background while required fields remain with default styling − ...

Read More
Showing 21201–21210 of 61,297 articles
Advertisements