Front End Technology Articles

Page 29 of 652

How to create div that contains the multiple fixed-size images

Aman Gupta
Aman Gupta
Updated on 16-Mar-2026 1K+ Views

Creating a div container with multiple fixed-size images is a common requirement in web development for galleries, portfolios, and product catalogs. This approach ensures visual consistency by giving all images uniform dimensions regardless of their original sizes. Syntax Following is the basic HTML structure for a div containing multiple images − Following is the CSS syntax to create fixed-size images − .image-container img { width: fixed-width; height: fixed-height; object-fit: ...

Read More

How to create a group of related options in a drop-down list using HTML

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

The tag in HTML allows you to create logical groups of related options within a dropdown list. This improves user experience by organizing options into categories, making it easier for users to find and select the desired option from long lists. Syntax Following is the syntax for the tag − Option 1 Option 2 The label attribute specifies the category name that appears as a heading for the grouped options. ...

Read More

How to create the LESS file and how to compile it

Aman Gupta
Aman Gupta
Updated on 16-Mar-2026 865 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 288 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 235 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 397 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
Showing 281–290 of 6,519 articles
« Prev 1 27 28 29 30 31 652 Next »
Advertisements