Devesh Chauhan

Devesh Chauhan

47 Articles Published

Articles by Devesh Chauhan

47 articles

Use of the DFN element type in HTML

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 443 Views

The element in HTML represents the defining instance of a term or phrase that is being defined within the content. It stands for Definition and is used to mark the term that is explained or defined in the surrounding text, helping browsers and search engines identify important terminology. Syntax Following is the basic syntax for the element − term The element can also include attributes for enhanced functionality − term abbreviation Key Features of the DFN Element The element has the following characteristics − ...

Read More

Div Layout vs. Table Layout in HTML

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 6K+ Views

In HTML, a layout defines the basic structure and appearance of a website. HTML layout is a blueprint that shows us how HTML elements are arranged in a webpage. It provides functionality for creating webpages using simple HTML tags. Two primary approaches exist for creating layouts: div-based layouts and table-based layouts. DIV Layout Div layout is the most common and recommended layout approach in modern HTML, based on elements. The element in HTML is used to define sections of a document. The tag is a container tag with both opening and closing tags. We ...

Read More

Why we should not use tables for HTML Layout?

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 458 Views

In this article, we will explore why using tables for HTML layout is strongly discouraged in modern web development. While tables are perfectly suitable for displaying tabular data, using them to structure page layouts creates numerous problems for performance, accessibility, and maintainability. A layout in HTML specifies the fundamental organization and visual structure of a website. The HTML layout serves as a blueprint for how elements should be positioned, giving you the ability to create well-structured websites using appropriate HTML elements. What is Table Layout? Table layout refers to using the element and its related tags ...

Read More

Types of graphics are supported by HTML5?

Devesh Chauhan
Devesh Chauhan
Updated on 16-Mar-2026 1K+ Views

Graphics are visual representations used to convey ideas and enhance the overall user experience of a website. They help communicate complex messages in a simple and understandable way through photos, diagrams, illustrations, and interactive elements. HTML5 provides several technologies for incorporating graphics into web pages. Graphics in HTML serve multiple purposes including enhancing webpage appearance, improving user interaction, and providing visual context. Let's explore the main types of graphics supported by HTML5. SVG (Scalable Vector Graphics) SVG stands for Scalable Vector Graphics. It is an XML-based markup language for describing vector graphics. SVG files are saved with ...

Read More

How to position absolute rendering the button in a new line?

Devesh Chauhan
Devesh Chauhan
Updated on 15-Mar-2026 2K+ Views

The CSS position property controls how elements are positioned within a webpage. When using position: absolute, elements are removed from the normal document flow, allowing precise placement and forcing subsequent elements to appear on new lines. Syntax selector { position: absolute; top: value; left: value; right: value; bottom: value; } Position Property Values ValueDescription staticDefault positioning according to document flow relativePositioned relative to its normal position absolutePositioned relative to nearest positioned ancestor fixedPositioned ...

Read More

How to display text Right-to-Left Using CSS?

Devesh Chauhan
Devesh Chauhan
Updated on 15-Mar-2026 2K+ Views

The CSS direction property is used to set the text direction for elements, allowing you to display text from right-to-left (RTL) or left-to-right (LTR). This is essential for languages like Arabic, Hebrew, and Urdu that are naturally written from right to left. Syntax selector { direction: rtl | ltr | initial | inherit; } Possible Values ValueDescription rtlSets text direction from right to left ltrSets text direction from left to right (default) initialSets the property to its default value inheritInherits the direction from parent element Method 1: ...

Read More

How to set logo inside loader using CSS?

Devesh Chauhan
Devesh Chauhan
Updated on 15-Mar-2026 3K+ Views

To set a logo inside a loader using CSS, you need to create a loader animation and position a logo image at its center. This technique is commonly used to maintain brand identity during page loading states and provides a professional user experience. Syntax .loader { /* Loader styles and animation */ } .loader img { /* Logo positioning and counter-animation */ } @keyframes loaderSpin { /* Loader rotation animation */ } @keyframes logoCounterSpin { /* Logo counter-rotation ...

Read More

How flexible items can be of the same length regardless of its content in CSS?

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

The CSS flex property allows you to create flexible items of equal length regardless of their content. This is achieved by controlling how flex items grow, shrink, and their initial size within a flex container. Syntax selector { flex: flex-grow flex-shrink flex-basis; } Flex Properties The flex property is a shorthand that combines three individual properties − Flex-grow This property defines how much a flex item should grow relative to other flex items when there's extra space in the container. The default value is 0. Flex-shrink ...

Read More

How to use font-optical-sizing property in CSS?

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

The CSS font-optical-sizing property controls whether the browser automatically adjusts the appearance of text glyphs to optimize readability at different font sizes. This property is particularly useful with variable fonts that support optical size variations. Syntax selector { font-optical-sizing: value; } Possible Values ValueDescription autoBrowser automatically optimizes glyph shapes based on font size (default) noneDisables optical sizing adjustments inheritInherits the value from the parent element How Optical Sizing Works When optical sizing is enabled, the browser adjusts glyph characteristics based on font size − ...

Read More

How to use CSS to separate content and design?

Devesh Chauhan
Devesh Chauhan
Updated on 15-Mar-2026 1K+ Views

CSS allows you to separate content (HTML structure) and design (visual styling) by keeping styling information in separate CSS files rather than mixing it with HTML. This separation makes websites easier to maintain, more organized, and allows for consistent styling across multiple pages. Syntax /* External CSS file */ selector { property: value; } Benefits of Separating Content and Design Maintainability − Easier to update styles across multiple pages Reusability − Same CSS file can be used for multiple HTML pages Cleaner Code − HTML focuses on structure, CSS ...

Read More
Showing 1–10 of 47 articles
« Prev 1 2 3 4 5 Next »
Advertisements