Web Development Articles

Page 30 of 801

How to create the LESS file and how to compile it

Aman Gupta
Aman Gupta
Updated on 16-Mar-2026 876 Views

LESS (Leaner Style Sheets) is a dynamic CSS preprocessor that extends CSS with additional features like variables, mixins, nested rules, and functions. When compiled, a .less file generates standard CSS output that browsers can understand. LESS helps developers write more maintainable and organized stylesheets by providing programming features that CSS lacks. Just like Java source files (.java) compile to bytecode files (.class), LESS files (.less) compile to CSS files (.css). Installation and Setup Before creating LESS files, you need to install the LESS compiler. The most common method is using Node Package Manager (npm) − ...

Read More

How to create mixin for placeholder in SASS

Aman Gupta
Aman Gupta
Updated on 16-Mar-2026 294 Views

A mixin in SASS is a reusable block of CSS declarations that can be included throughout your stylesheet. Creating a mixin for placeholder styling helps avoid repetitive code when styling form input placeholders across different browsers. Placeholder styling requires vendor-specific pseudo-selectors to ensure cross-browser compatibility. Using a SASS mixin centralizes this logic and makes it easily reusable with customizable parameters. Syntax Following is the syntax to create a mixin in SASS − @mixin mixin-name($parameter1, $parameter2) { // CSS properties here property: $parameter1; } To use the mixin, ...

Read More

How to set caption for an image using HTML?

Shabaz Alam
Shabaz Alam
Updated on 16-Mar-2026 15K+ Views

HTML provides a semantic way to add captions to images using the and elements. Image captions enhance accessibility, provide context, and improve the overall user experience by offering descriptive text that explains or complements the visual content. Syntax Following is the basic syntax for creating image captions in HTML − Caption text here The element groups the image and caption together semantically, while contains the actual caption text. Basic Image Caption The element represents self-contained content, typically with ...

Read More

How to set date and time when the text was deleted using HTML?

Shabaz Alam
Shabaz Alam
Updated on 16-Mar-2026 239 Views

When creating web content, it's common to update text by removing outdated or incorrect information. HTML provides semantic elements to mark these changes while preserving a record of when modifications occurred. The del element and time element are the primary methods for tracking text deletions with timestamps. Syntax Following is the syntax for marking deleted text with a timestamp − deleted content The datetime attribute follows the ISO 8601 format, which includes date, time, and optionally timezone information. Following is the syntax for using the time element to display deletion timestamps − ...

Read More

How to set different background properties in one declaration?

Shabaz Alam
Shabaz Alam
Updated on 16-Mar-2026 403 Views

CSS (Cascading Style Sheets) provides a powerful background shorthand property that allows you to set multiple background properties in a single declaration. This approach is efficient for web developers as it saves time, reduces code length, and improves readability while maintaining full control over background styling. Understanding Background Properties Before using the background shorthand, it's important to understand the individual background properties available in CSS − background-color − Sets the background color of an element using color names, hex values, RGB, or HSL values. background-image − Sets a background image using URLs, linear gradients, or radial ...

Read More

How to set height of an iframe element using HTML?

Shabaz Alam
Shabaz Alam
Updated on 16-Mar-2026 2K+ Views

The iframe element is a powerful tool in HTML that allows web developers to embed external content into a web page. It creates a container that displays other HTML documents within a page. The default height of an iframe element does not always fit with the webpage's layout, so we need to ensure that it's sized correctly to fit seamlessly into the page layout. Understanding the Iframe Element Iframe stands for inline frame. It allows developers to embed content such as videos, maps, or social media feeds from another website or web page into the current page. The ...

Read More

How to create links to sections within the same page in HTML?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 16-Mar-2026 11K+ Views

Creating internal links within a web page in HTML improves user experience by allowing visitors to jump to specific sections without scrolling through the entire page. By using the id attribute and the tag, you can establish anchor links that provide quick navigation to different parts of your content. Syntax Following is the syntax for creating an element with an ID attribute − Content Following is the syntax for creating a link to that section − Link text ID Attribute The id attribute in HTML is used to ...

Read More

How to create mail and phone link in HTML?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 16-Mar-2026 2K+ Views

Creating mailto and tel links in HTML allows users to easily contact you directly from your webpage. A mailto link opens the user's default email client with your email address pre-filled, while a tel link initiates a phone call on mobile devices or opens the default calling application on desktops. Mailto Links A mailto link creates a hyperlink that, when clicked, opens the user's default email client and creates a new email message to a specified email address. Syntax Following is the basic syntax for creating a mailto link − Email Us ...

Read More

How to automatically transfer visitors to a new web page?

Asif Rahaman
Asif Rahaman
Updated on 16-Mar-2026 1K+ Views

As a website owner or developer, there may be times when you need to automatically transfer visitors to a new web page. Whether it's because you've moved a page to a new URL or want to redirect visitors to a different section of your site, there are several different methods you can use to achieve this. In this article, we'll explore the different types of client-side redirects you can use to automatically transfer visitors to a new web page, and provide examples of how to implement each one. Meta Refresh Redirects One of the easiest ways to ...

Read More

How to build custom form controls using HTML?

Asif Rahaman
Asif Rahaman
Updated on 16-Mar-2026 513 Views

Custom form controls allow developers to create unique, styled form elements that match their website's design and provide enhanced user experiences. While HTML provides standard form elements like checkboxes, radio buttons, and input fields, building custom controls gives you complete control over appearance and behavior. Syntax Following is the basic syntax for creating custom form controls − Control Label The pattern uses a label wrapper, hidden input element, custom visual indicator, and descriptive text. CSS provides the styling and pseudo-elements handle ...

Read More
Showing 291–300 of 8,010 articles
« Prev 1 28 29 30 31 32 801 Next »
Advertisements