Web Development Articles

Page 391 of 801

How to use FastClick with jQuery Mobile the right way in HTML?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 225 Views

FastClick is a library that eliminates the 300ms delay on mobile browsers for touch events. However, jQuery Mobile provides a built-in solution with the vclick event that handles this automatically. The Problem with Mobile Touch Delays Mobile browsers introduce a 300ms delay between a touch event and the click event to detect double-taps. This creates a sluggish user experience on mobile web applications. jQuery Mobile's Built-in Solution jQuery Mobile includes virtual events like vclick that provide immediate response without the 300ms delay. This eliminates the need for external libraries like FastClick. Using vclick Event ...

Read More

Comparison of CSS versions

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 2K+ Views

Cascading Style Sheets (CSS) has evolved significantly since its inception. Understanding the differences between CSS versions helps developers choose the right features for their projects and maintain browser compatibility. CSS1 (1996) CSS1 became a W3C recommendation in December 1996. This initial version introduced the fundamental CSS language and a basic visual formatting model for HTML elements. It provided essential styling capabilities like fonts, colors, margins, and borders. CSS2 (1998) CSS2 became a W3C recommendation in May 1998, building upon CSS1 with significant enhancements: Media-specific style sheets for printers and aural devices Downloadable fonts support ...

Read More

Type Selectors in CSS

varma
varma
Updated on 15-Mar-2026 1K+ Views

Type selectors in CSS target HTML elements directly by their tag names. They are the most basic form of CSS selectors and apply styles to all instances of a specific HTML element throughout the document. Syntax element { property: value; } Where element is any valid HTML tag name like h1, p, div, span, etc. Example: Styling Headings h1 { ...

Read More

Descendent Selectors in CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 538 Views

CSS descendant selectors allow you to apply styles to elements that are nested inside other elements. This targeting method helps create specific styling rules without affecting similar elements elsewhere on the page. Syntax ancestor descendant { property: value; } The descendant selector uses a space between two selectors to target elements that are children, grandchildren, or any level deep within the ancestor element. Example: Styling Emphasized Text in Lists Apply yellow color to elements only when they appear inside tags: ul ...

Read More

How to define multiple style rules for a single element in CSS?

Samual Sam
Samual Sam
Updated on 15-Mar-2026 1K+ Views

You may need to define multiple style rules for a single element. You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example: h1 { color: #36C; font-weight: normal; letter-spacing: .4em; ...

Read More

Working with Inline CSS

Prabhas
Prabhas
Updated on 15-Mar-2026 441 Views

Inline CSS allows you to apply styles directly to HTML elements using the style attribute. This method applies styles to individual elements only, making it useful for quick styling or element-specific customizations. Syntax You can use the style attribute on any HTML element to define inline style rules: Style Attribute Attribute Value ...

Read More

What are the ways to include style sheet rules in an HTML document

seetha
seetha
Updated on 15-Mar-2026 633 Views

There are three main ways to include CSS styles in an HTML document: inline styles using the style attribute, internal stylesheets using the element, and external stylesheets using the element. Method 1: Inline Styles Inline styles are applied directly to HTML elements using the style attribute: Inline Styles Example Inline Styled Heading This paragraph has inline styles. Method 2: Internal Stylesheets Internal stylesheets are defined within the element in the document's ...

Read More

What is pica? How to set the font size in CSS using pica?

Samual Sam
Samual Sam
Updated on 15-Mar-2026 926 Views

A pica is a CSS unit of measurement primarily used in print design. One pica equals 12 points, and there are 6 picas per inch (1pc = 12pt = 1/6 inch). The pica unit is specified using "pc" in CSS. Understanding Pica Units Picas are absolute units like pixels, but they're based on traditional typography measurements: 1 pica = 12 points 6 picas = 1 inch 1pc ≈ 16 pixels (at 96 DPI) Syntax font-size: value pc; /* Examples */ font-size: 1pc; /* 12 points */ font-size: 2.5pc; ...

Read More

Which property is used in CSS to control the repetition of an image in the background?

Samual Sam
Samual Sam
Updated on 15-Mar-2026 2K+ Views

To control the repetition of an image in the background, use the background-repeat property. You can use no-repeat value for the background-repeat property if you do not want to repeat an image, in this case, the image will display only once. Syntax background-repeat: repeat | repeat-x | repeat-y | no-repeat | space | round; Common Values Value Description repeat Repeats both horizontally and vertically (default) repeat-x Repeats horizontally only repeat-y Repeats vertically only no-repeat Displays image only once Example: Basic Background ...

Read More

Usage of background-color property in CSS

Sravani S
Sravani S
Updated on 15-Mar-2026 147 Views

The background-color property is used to set the background color of an element. It accepts color values in various formats including color names, hexadecimal, RGB, and HSL values. Syntax background-color: color | transparent | inherit | initial; Example: Using Color Names You can use predefined color names to set the background color: Background Color Example This text ...

Read More
Showing 3901–3910 of 8,010 articles
« Prev 1 389 390 391 392 393 801 Next »
Advertisements