Articles on Trending Technologies

Technical articles with clear explanations and examples

Design a Rotating card effect using HTML and CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 738 Views

The rotating card effect creates an engaging visual experience where cards spin when you hover over them, revealing additional content on the back side. This effect is achieved using CSS 3D transforms and transitions. Syntax .card-container { perspective: value; } .card { transform-style: preserve-3d; transition: transform duration; } .card:hover { transform: rotateY(180deg); } .card-side { backface-visibility: hidden; } Key CSS Properties PropertyDescription perspectiveDefines the distance from the viewer to the ...

Read More

Get key with maximum value in Dictionary in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 878 Views

A Python dictionary contains key-value pairs. In this article we will see how to get the key of the element whose value is maximum in the given Python dictionary. Using max() with get() The max() function with the get() method is the most straightforward approach to find the key with maximum value ? Example scores = {"Mon": 3, "Tue": 11, "Wed": 8} print("Given Dictionary:") print(scores) # Using max and get max_key = max(scores, key=scores.get) print("The Key with max value:") print(max_key) The output of the above code is ? Given Dictionary: ...

Read More

Design a Contact us Page using HTML and CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 911 Views

It really doesn't make sense to have a contact form on a website without one, much like a burger without a bun. If your business is online, you must have a method for clients to get in touch with you. A "Contact Us" form is an online form that website users can use to submit messages or requests to the website's owners or operators. It provides customers with an easy way to get in touch with the company without requiring them to use traditional contact methods like phone calls or emails. The data is often forwarded to the recipient's ...

Read More

Get indices of True values in a binary list in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 888 Views

When a Python list contains boolean values like True or False and numeric values like 1 or 0, it is called a binary list. In this article, we will take a binary list and find the indices of positions where the list element evaluates to True. Using enumerate() with List Comprehension The enumerate() function extracts all elements from the list along with their indices. We apply a condition to check if the extracted value is truthy or not ? Example binary_list = [True, False, 1, False, 0, True] # printing original list print("The original ...

Read More

Get first index values in tuple of strings in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 422 Views

When working with a tuple of strings, you may need to extract the first character from each string to create a new list. Python provides several approaches to accomplish this task efficiently. Using Index with List Comprehension The most straightforward approach uses list comprehension with index notation to access the first character (index 0) of each string ? tupA = ('Mon', 'Tue', 'Wed', 'Fri') # Given tuple print("Given tuple :", tupA) # Using index with list comprehension res = [sub[0] for sub in tupA] # Printing result print("First index characters:", res) ...

Read More

How to add a specific color to an element using CSS?

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 292 Views

A basic way that people express themselves is via the use of color. Before they even have the manual skill to sketch, children play with color. Perhaps for this reason, when learning to create websites, people frequently wish to play with color as one of the initial elements. There are several ways to add color to your HTML elements using CSS to get the exact look you desire. You may manage the appearance of your HTML elements with CSS (Cascading Style Sheets), including their colors, fonts, sizes, and positions. Let's look one by one on adding a specific color ...

Read More

Get first element with maximum value in list of tuples in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 1K+ Views

When working with a list of tuples, you may need to find the first element of the tuple that has the maximum value in a specific position. This is useful when you have data like scores, dates, or measurements stored as tuples and want to identify the tuple with the highest value. Using itemgetter() and max() The itemgetter() function from the operator module extracts values from a specific index position. Combined with max(), it finds the tuple with the maximum value ? from operator import itemgetter # initializing list data = [('Mon', 3), ('Tue', 20), ...

Read More

How is border-box different from content-box?

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 450 Views

The CSS box-sizing property controls how an element's total width and height are calculated. Understanding the difference between border-box and content-box is crucial for precise layout control. Syntax box-sizing: content-box | border-box; CSS content-box (Default) This is the default value. The width and height properties only include the content area. Padding and border are added to the outside, making the element larger than the specified dimensions. Example The following example shows content-box behavior where padding and border add to the total size − ...

Read More

Flatten given list of dictionaries in Python

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 1K+ Views

We have a list whose elements are dictionaries. We need to flatten it to get a single dictionary where all these list elements are present as key-value pairs. Using for Loop and update() We take an empty dictionary and add elements to it by reading the elements from the list. The addition of elements is done using the update() function ? listA = [{'Mon':2}, {'Tue':11}, {'Wed':3}] # printing given arrays print("Given array:", listA) print("Type of Object:", type(listA)) res = {} for x in listA: res.update(x) # Result print("Flattened object:", ...

Read More

How to use text as background using CSS?

Abhishek
Abhishek
Updated on 15-Mar-2026 2K+ Views

Text as background creates interesting visual effects where text appears behind other content. This technique uses CSS positioning and z-index to layer text elements, making them appear as decorative background elements rather than primary content. Syntax /* Method 1: Absolute positioning */ .background-text { position: absolute; z-index: -1; } /* Method 2: Pseudo elements */ .element::before { content: "Background Text"; position: absolute; z-index: -1; } Method 1: Using Absolute Positioned Elements This method ...

Read More
Showing 19451–19460 of 61,297 articles
Advertisements