Front End Scripts Articles

Page 16 of 47

What is the correct use of schema.org SiteNavigationElement in HTML?

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 868 Views

The schema.org SiteNavigationElement extends WebPageElement and is used to mark up navigation links on a webpage. It helps search engines understand your site's navigation structure and can enhance search result displays with sitelinks. Basic Syntax The SiteNavigationElement uses microdata attributes to define navigation properties: Link Text Key Properties The main properties used with SiteNavigationElement are: url - The destination URL of the navigation link name - The visible text or name ...

Read More

Set the font stretch of an element with CSS

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

The CSS font-stretch property controls the width of characters in a font, allowing you to make text narrower or wider. This property only works if the font family has condensed or expanded variants available. Syntax font-stretch: value; Possible Values The font-stretch property accepts the following values: normal - Default width ultra-condensed - Most narrow extra-condensed - Very narrow condensed - Narrow semi-condensed - Slightly narrow semi-expanded - Slightly wide expanded - Wide extra-expanded - Very wide ultra-expanded - Most wide wider - Relative to parent narrower - Relative to parent ...

Read More

HTML5 Input type=number removes leading zero

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

HTML5's input type="number" automatically removes leading zeros because it treats the value as a numeric data type. This creates issues when you need to preserve leading zeros, such as for international phone numbers, postal codes, or ID numbers. The Problem When using type="number", browsers strip leading zeros from the input value: Show Value function showValue() { let input = document.getElementById('numberInput'); ...

Read More

Add or subtract space between the letters that make up a word with CSS

Nikitha N
Nikitha N
Updated on 15-Mar-2026 399 Views

To add or subtract space between the letters that make up a word, use the letter-spacing CSS property. This property controls the horizontal spacing between characters in text. Syntax letter-spacing: normal | length | initial | inherit; Property Values normal - Default spacing between letters length - Specific spacing value (px, em, rem, etc.) initial - Sets to default value inherit - Inherits from parent element Example: Adding Letter Spacing ...

Read More

Raise the Mobile Safari HTML5 application cache limit?

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 764 Views

Mobile Safari imposes specific limits on HTML5 application cache storage, unlike desktop Safari which has no strict limits. Understanding these constraints is crucial for mobile web development. Mobile Safari Cache Limits The default application cache limit on mobile Safari is 5MB. This applies to the overall cache storage allocated to your web application. Desktop Safari No Limit Unlimited Cache Mobile Safari 5MB Limit ...

Read More

Align the text of a document with CSS

varma
varma
Updated on 15-Mar-2026 113 Views

The text-align property in CSS is used to align the text content within an element. It accepts several values: left (default), right, center, and justify. Syntax text-align: left | right | center | justify; Values left: Aligns text to the left edge (default) right: Aligns text to the right edge center: Centers the text horizontally justify: Spreads text evenly across the width, aligning both left and right edges Example Here's how to use different text alignment values: ...

Read More

Display video inside HTML5 canvas

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 570 Views

You can display video inside an HTML5 canvas by using the drawImage() method to render video frames onto the canvas. This technique is useful for applying real-time effects, overlays, or custom controls to video content. Basic Setup First, create the HTML structure with both video and canvas elements: Video in Canvas Your browser does not support the video tag. ...

Read More

Add or subtract space between the words of a sentence with CSS

Priya Pallavi
Priya Pallavi
Updated on 15-Mar-2026 471 Views

The word-spacing property is used to add or subtract space between the words of a sentence. Possible values are normal or a number specifying space. Syntax word-spacing: normal | length | initial | inherit; Parameters Value Description normal Default spacing between words length ...

Read More

Escaping/encoding single quotes in JSON encoded HTML5 data attributes

George John
George John
Updated on 15-Mar-2026 4K+ Views

When embedding JSON data in HTML5 data attributes, single quotes can break HTML parsing. JavaScript provides several methods to properly escape or encode single quotes to ensure valid HTML output. The Problem with Single Quotes in Data Attributes Single quotes inside JSON values can break HTML attribute parsing when the attribute itself uses single quotes: // Problematic - single quote breaks HTML

Read More

Is it possible to validate the size and type of input=file in HTML5?

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 413 Views

Yes, it is possible to validate the size and type of input type="file" in HTML5. You can achieve this using JavaScript to access the File API and check file properties before form submission. HTML5 File Validation Structure The HTML5 File API provides access to file properties like size, type, and name through the files property of the input element. ...

Read More
Showing 151–160 of 465 articles
« Prev 1 14 15 16 17 18 47 Next »
Advertisements