Diksha Patro

Diksha Patro

99 Articles Published

Articles by Diksha Patro

Page 5 of 10

Longest Job First (LJF) CPU Scheduling Algorithm

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 3K+ Views

Longest Job First (LJF) is a CPU scheduling algorithm that prioritizes processes based on their burst time. In LJF, the processes with the largest burst time are given priority over the shorter ones. This algorithm works on a non-preemptive basis, meaning once a process is started, it will continue to run until it completes, and no other process can preempt it. To implement the LJF algorithm, processes are sorted in the ready queue based on their burst times in descending order. The process with the largest burst time among all the processes that have arrived until that time is ...

Read More

How to decide the order of precedence of the style attributes in HTML?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 309 Views

In HTML and CSS, the order of precedence (also called specificity) determines which style rules are applied when multiple styles target the same element. Understanding this hierarchy is crucial for effective web development and debugging style conflicts. CSS follows a specific cascade order where styles with higher precedence override those with lower precedence. This system ensures predictable styling behavior when multiple style sources exist. CSS Precedence Order The CSS cascade follows this order of precedence, from highest to lowest priority − Inline styles − Styles applied directly to an element using the style attribute Internal ...

Read More

How to declare a custom attribute in HTML?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 6K+ Views

In this article, we will discuss how to declare a custom attribute in HTML. Custom attributes are useful when you want to store additional information that is not part of standard HTML attributes. They provide flexibility and customization in HTML, making your code more maintainable and functional. Approaches We have two different approaches to declaring a custom attribute in HTML − Using the data- prefix − Standard HTML5 approach for custom attributes Using custom attributes − Non-standard approach with custom naming Syntax Following is the syntax for data- attributes − Content ...

Read More

How to add a file uploads function to a webpage in HTML?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 4K+ Views

File uploads are essential for modern web applications, allowing users to share documents, images, and other files. In HTML, file uploads are implemented using the element combined with form handling. This functionality requires both client-side HTML forms and server-side processing to securely store uploaded files. Syntax Following is the basic syntax for creating a file upload form in HTML − The key attributes are − method="post" − File uploads require POST method enctype="multipart/form-data" − Essential encoding type for file uploads action ...

Read More

How to add Flash content within a webpage in HTML?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 3K+ Views

Flash content was once a popular multimedia technology for adding interactive elements like animations, games, and videos to web pages. However, Adobe Flash is now officially discontinued (end-of-life December 2020) and modern browsers have removed Flash support entirely due to security vulnerabilities and performance issues. This article covers the historical methods for embedding Flash content using HTML, but strongly recommends using modern alternatives like HTML5, CSS, and JavaScript for multimedia content in today's web development. Historical Flash Embedding Methods There were two primary approaches for embedding Flash content in HTML − Using the ...

Read More

How to add Google map inside html page without using API key?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 10K+ Views

Google Maps provides a convenient way to display locations on web pages. While the official Google Maps JavaScript API requires an API key, you can embed Google Maps directly using iframe elements without any authentication. This method allows you to display interactive maps with basic controls and navigation features. An iframe (inline frame) is an HTML element that embeds another webpage within your current page. Google Maps provides embeddable URLs specifically designed for iframe usage, making it simple to integrate maps without complex setup or API management. Syntax Following is the basic syntax for embedding a Google ...

Read More

How to add horizontal line in HTML?

Diksha Patro
Diksha Patro
Updated on 16-Mar-2026 5K+ Views

In this article, we will show you how to add a horizontal line to your webpage using HTML. A horizontal line, also known as a horizontal rule, is a way to separate content on a webpage and can be used for visual appeal or to indicate a change in content. There are multiple ways to add a horizontal line to your webpage in HTML, but the most common approach is by using the tag. The tag is a self-closing tag that creates a horizontal line on the webpage. This approach is simple and straightforward, and it requires ...

Read More

How to add fade-in effect using pure JavaScript?

Diksha Patro
Diksha Patro
Updated on 15-Mar-2026 7K+ Views

Introduction We use the fade effect to bring attention to certain parts of our website by gradually increasing or decreasing their opacity. This gradual change in opacity is called the fade-in or fade-out effect. When we gradually increase the opacity, it's known as the fade-in effect and is used to make the selected part of the page become more visible over a chosen amount of time. This creates a smooth transition and helps make our website more dynamic and engaging for our users. In this article, we will be exploring two ways in which we can implement the ...

Read More

How to crop an image using canvas?

Diksha Patro
Diksha Patro
Updated on 15-Mar-2026 3K+ Views

In this article, we will discuss how to crop an image using HTML5 Canvas. When you crop an image, you essentially trim away parts of it to create a new image with a specific size or composition. This can be useful for resizing images to fit specific frames or removing unwanted parts of an image. Approaches We have two different approaches to crop an image using canvas − Using the drawImage() method Using the getImageData() method Let us look at each approach in detail. Approach 1: Using the drawImage() Method The drawImage() ...

Read More

How to darken an Image using CSS?

Diksha Patro
Diksha Patro
Updated on 15-Mar-2026 21K+ Views

To darken an image using CSS, we can apply various techniques such as adjusting brightness with filters, creating overlays with opacity, or using gradient overlays. This effect is commonly used to enhance text readability over background images or create visual emphasis. Syntax /* Method 1: Using filter property */ img { filter: brightness(percentage); } /* Method 2: Using overlay with opacity */ .container::after { background-color: black; opacity: value; } /* Method 3: Using linear-gradient overlay */ .element { background-image: ...

Read More
Showing 41–50 of 99 articles
« Prev 1 3 4 5 6 7 10 Next »
Advertisements