Articles on Trending Technologies

Technical articles with clear explanations and examples

How to repair broken pictures in HTML?

Souvik Chakraborty
Souvik Chakraborty
Updated on 15-Mar-2026 562 Views

Images play an important role in increasing user interest in content and enriching the appearance of websites. However, broken images can occur due to wrong links, missing files, or server problems, which negatively affects user experience. In this article, we will explore how to repair broken pictures in HTML using different approaches to ensure graceful handling of image loading failures. Approaches to Repair Broken Pictures Using alt Attribute Using onerror Event Using CSS Fallback Using alt Attribute The alt attribute provides alternative text that displays when an image cannot be loaded. This text ...

Read More

Get last element of each sublist in Python

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

A list in Python can also contain lists inside it as elements. These nested lists are called sublists. In this article we will solve the challenge of retrieving only the last element of each sublist in a given list. Using for Loop It is a very simple approach in which we loop through the sublists fetching the item at index -1 in them. A for loop is used for this purpose as shown below ? sublists = [['Mon', 1], ['Tue', 'Wed', "Fri"], [12, 3, 7]] print("Given List:") print(sublists) print("Last Items from sublists:") for item in ...

Read More

How to Hide Scrollbar Using CSS?

Souvik Chakraborty
Souvik Chakraborty
Updated on 15-Mar-2026 756 Views

To hide scrollbar using CSS, we will understand different approaches. Scrollbars are core components of web browsers that allow users to navigate content areas larger than the viewable window. We can hide scrollbars while maintaining scrolling functionality using the overflow property. Syntax selector { overflow-x: value; overflow-y: value; } /* Or shorthand */ selector { overflow: value; } Possible Values ValueDescription visibleContent is not clipped, may render outside the element hiddenContent is clipped and scrollbars are hidden scrollContent is clipped but ...

Read More

Get first element of each sublist in Python

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

A list in Python can also contain lists inside it as elements. These nested lists are called sublists. In this article we will solve the challenge of retrieving only the first element of each sublist in a given list. Using for Loop It is a very simple approach in which we loop through the sublists fetching the item at index 0 in them. A for loop is used for this purpose as shown below ? Example nested_list = [['Mon', 1], ['Tue', 'Wed', "Fri"], [12, 3, 7]] print("Given List:", nested_list) print("First Items from sublists:") for item ...

Read More

How to Separate Header from Body in HTML?

Souvik Chakraborty
Souvik Chakraborty
Updated on 15-Mar-2026 904 Views

To separate header from body in HTML, you can create visual and structural distinction between the header section and the main content. The header typically contains navigation, titles, and introductory elements, while the body holds the primary content of the webpage. In this article, we will explore different approaches to effectively separate the header from the body content using HTML structure and CSS styling. Approaches to Separate Header from Body Using Semantic HTML Tags Using CSS Styling Using Multiple Headers Method 1: Using Semantic HTML Tags HTML5 provides semantic tags that help create ...

Read More

Count unique sublists within list in Python

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

A Python list can contain sublists, which are lists nested within a larger list. In this article we will explore how to count the number of unique sublists within a given list using two different approaches. Using Counter Counter is a subclass of Dictionary used to keep track of elements and their count. It stores elements as dictionary keys and their count as dictionary values. To count sublists, we convert each sublist to a string representation ? Example from collections import Counter # Given List with sublists days_list = [['Mon'], ['Tue', 'Wed'], ['Tue', 'Wed']] ...

Read More

Check if list contains all unique elements in Python

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

A list in Python can contain elements all of which may or may not be unique. But for scenarios when we need unique elements like marking attendance for different roll numbers of a class, we need to check if all elements are unique. Below are the approaches we can use. Using set() Method A Python set is a collection which is unordered, unindexed and contains only unique elements. We can compare the length of the set created from the list with the length of the list itself. They will be equal only if there are unique elements in ...

Read More

How to Decompile an HTML File?

Souvik Chakraborty
Souvik Chakraborty
Updated on 15-Mar-2026 586 Views

Decompiling an HTML file refers to examining and understanding the source code that creates a webpage. Unlike compiled programming languages, HTML is already in human-readable format, making it easily accessible for analysis and learning purposes. In this article, we will explore various methods to examine and work with HTML file content. Method 1: Viewing Source Code in Browser The most straightforward approach to examine HTML code is through your web browser's built-in source viewing feature. Steps Navigate to the webpage you want to examine Right-click anywhere on the page and select "View Page Source" ...

Read More

Assign ids to each unique value in a Python list

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

When working with Python lists, you may need to assign unique IDs to each distinct value while ensuring that duplicate values receive the same ID. This is useful for data analysis, categorization, and indexing operations. Using enumerate() and OrderedDict.fromkeys() The enumerate() function creates a counter for each element, while OrderedDict.fromkeys() preserves the first occurrence order and eliminates duplicates ? from collections import OrderedDict values = ['Mon', 'Tue', 'Wed', 'Mon', 5, 3, 3] print("The given list:", values) # Assigning ids to values list_ids = [{v: k for k, v in enumerate( ...

Read More

How to Compare Two HTML Elements?

Souvik Chakraborty
Souvik Chakraborty
Updated on 15-Mar-2026 527 Views

Comparing HTML elements in JavaScript is a common requirement when building dynamic web applications. You might need to check if two elements have the same tag name, classes, content, or other properties. This article explores two effective methods for comparing HTML elements using JavaScript. Method 1: Manual Element Comparison Manual comparison gives you complete control over which properties to compare. This method directly checks specific attributes like tag name, class name, and content − Manual HTML Elements Comparison ...

Read More
Showing 19331–19340 of 61,299 articles
Advertisements