Javascript Articles

Page 529 of 534

How can I get the HTML/CSS/JavaScript source code of a website?

Ayush Singh
Ayush Singh
Updated on 15-Mar-2026 2K+ Views

Accessing the HTML, CSS, and JavaScript source code of a website is an essential skill for web developers and designers. Modern web browsers provide built-in developer tools that allow you to inspect and analyze any website's code structure, styling, and functionality. This tutorial will guide you through the process of viewing website source code using browser developer tools. Method 1: Using Browser Developer Tools Browser developer tools are the most comprehensive way to examine website source code. These tools provide real-time access to all three core web technologies. Step 1: Open Your Web Browser and Navigate to ...

Read More

Advanced JavaScript Animation Techniques using CSS and JavaScript Libraries

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 611 Views

As web development continues to evolve, creating engaging and interactive user experiences has become an essential part of modern web applications. From subtle micro-interactions to complex visual effects, animations play a crucial role in capturing the attention of users and conveying information in a dynamic and visually appealing manner. JavaScript, in combination with CSS and various JavaScript libraries, offers powerful techniques for creating advanced animations on the web. In this article, we will delve into the world of advanced JavaScript animation techniques, exploring how CSS transitions and JavaScript libraries can be harnessed to bring your web animations to life. ...

Read More

Difference between CSS and JavaScript

Pradeep Kumar
Pradeep Kumar
Updated on 15-Mar-2026 3K+ Views

A website is developed using HTML. HTML provides the backbone and structure for the website. However, using HTML alone, we can't create our desired website. Cascading Style Sheets (CSS) adds a styling layer to the website, applying formatting, changing layouts, and making the website visually appealing. JavaScript is a programming language that makes websites functional and interactive, adding animations, pop-up screens, and user interaction features. What is CSS? CSS stands for Cascading Style Sheets. CSS is a language used to style HTML documents. Using CSS, we can change document styles such as page layout, colors, font styles, and ...

Read More

How to load CSS files using JavaScript?

Saba Hilal
Saba Hilal
Updated on 15-Mar-2026 6K+ Views

Loading CSS files dynamically using JavaScript allows you to change page themes, implement dark/light mode toggles, or conditionally load styles based on user preferences. This technique is useful when you need to switch between different stylesheets without page refresh. Syntax /* Create link element */ const link = document.createElement("link"); link.href = "path/to/stylesheet.css"; link.rel = "stylesheet"; link.type = "text/css"; /* Append to head */ document.head.appendChild(link); Example 1: Loading CSS on Window Load This example demonstrates loading a CSS file automatically when the page finishes loading − ...

Read More

How to Create Image Lightbox Gallery using HTML CSS and JavaScript?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 4K+ Views

An image lightbox gallery is a web feature that displays images in an enlarged overlay format, allowing users to view images without navigating away from the main page. When a user clicks on a thumbnail image, it opens in a modal window with navigation controls and a close button. Syntax /* Gallery container */ .gallery { display: flex; flex-wrap: wrap; justify-content: center; } /* Lightbox overlay */ .lightbox { display: none; position: fixed; ...

Read More

Hide the cursor on a webpage using CSS and JavaScript

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 7K+ Views

In this tutorial, we will learn to hide the cursor on a webpage using CSS and JavaScript. Sometimes, we need to create custom cursor styles or hide the cursor entirely for specific HTML elements to enhance user experience or create interactive interfaces. There are two main approaches to hide the cursor on a webpage. One uses CSS, and another uses JavaScript. We will explore both methods with practical examples. Syntax selector { cursor: none; } Method 1: Using CSS to Hide the Cursor The CSS cursor property allows us ...

Read More

Why do we have External CSS and JS files

Devesh Chauhan
Devesh Chauhan
Updated on 15-Mar-2026 623 Views

In this article we will learn about CSS and JS files, explore their functions, different ways of using them in HTML documents, and understand why external CSS and JS files are preferred over inline and internal approaches. CSS (Cascading Style Sheets) CSS stands for Cascading Style Sheets and is used to apply styles to websites and webpages. It makes webpages look more organized, presentable, and appealing to users. CSS handles visual aspects like background colors, font sizes, colors, layout dimensions, and much more. There are three ways of using CSS in HTML documents − Inline ...

Read More

How to Add CSS Rules to a Stylesheet with JavaScript?

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 511 Views

The insertRule() method helps us add CSS rules to a stylesheet dynamically using JavaScript, while deleteRule() removes existing rules. These methods allow you to modify styles programmatically without editing the original CSS code. Syntax // Insert a rule stylesheet.insertRule(rule, index); // Delete a rule stylesheet.deleteRule(index); Method 1: Insert a CSS Rule To insert a rule at a defined position, use the insertRule() method. First, get the stylesheet using getElementById() and access its sheet property − body { ...

Read More

Auto Grow a Textarea with JavaScript in CSS

AmitDiwan
AmitDiwan
Updated on 15-Mar-2026 514 Views

Auto-growing textareas improve user experience by dynamically adjusting their height based on content length. This eliminates the need for scrollbars and provides a seamless typing experience. We can achieve this functionality using JavaScript to monitor content changes and CSS to control the visual appearance. Syntax textarea { resize: none; overflow: hidden; min-height: initial-height; } Method 1: Basic Auto-Growing Textarea This example demonstrates a simple auto-growing textarea that expands vertically as content is added − ...

Read More

Typing and Deleting Effect with JavaScript and CSS

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

With the help of CSS animations, we can create a typewriter typing and deleting effect using JavaScript. The infinite effect continuously cycles through words, typing them character by character and then deleting them to create an engaging visual animation. Syntax @keyframes animationName { to { opacity: value; } } selector { animation: name duration iteration-count; } HTML Structure First, create a container with two paragraph elements − one for the text and another for the cursor: ...

Read More
Showing 5281–5290 of 5,340 articles
« Prev 1 527 528 529 530 531 534 Next »
Advertisements