Latest Tutorials and How-To's
html
Tracking Clicked Links using ping Attribute of〈a〉Tag
The ping attribute can be included in link tags to notify the server when the link is clicked. This can be used for tracking purposes.
December 26, 2019
html
HTML〈output〉Tag - Representing Output of a Performed Calculation or User Action
The 〈output〉 tag is the standard HTML element in which the result of any user action or calculation performed can be shown. The result can inserted inside the tag using Javascript.
December 25, 2019
html
How to Lazy Load HTML Videos
HTML videos can be lazily loaded using the preload attribute of the 〈video〉element. preload="none" needs to be set to disable pre-loading of the video.
December 24, 2019
videos
An Introduction to Variable Fonts and Using Them in Webpages (VIDEO)
Variable fonts is a new font technology that allows a single font file to store multiple variations of the font. Variable fonts are going to bring a major change in web design.
December 22, 2019
javascript
Filling an Array with a Given Value in Javascript
The Array.fill() method can be used to fill an array with a specific value, starting from a given index and ending upto another index.
December 22, 2019
javascript
Flatten Array Containing Arrays in JavaScript
Flattening an array refers to the process taking an input array, which may itself contain n-dimensional arrays as its elements, to a single array. This can be done in Javascript using the flat() method.
December 20, 2019
javascript
Format Number as Currency in Javascript
The Intl.NumberFormat object can be used to format a number as a currency using Javascript. Various options can be set to customize format of currency code, comma / decimal separators etc.
December 18, 2019
javascript
Knowing whether Promise is Completed (either Fulfilled or Rejected) with finally() Callback
The finally() callback can be used to know whether the Promise was settled. We don't care whether it was resolved or rejected.
December 17, 2019
javascript
Setting Default Values to Variables if null or undefined (using ES2020 Nullish Coalescing Operator)
The nullish coalescing operator has been newly introduced in Javascript. This can be used to give default values if a variable is either null or undefined.
December 16, 2019
javascript
What Happens to setTimeout() / setInterval() Timers Running on Inactive Browser Tabs ?
Time delay for setTimeout() / setInterval() methods executing on inactive browser tabs are set to one second regardless of their value defined in code.
December 15, 2019
ui-ux
How to Disable Page Scrolling when Modal Dialog is Opened
When a fixed-position modal dialog is opened, scrollbars on the page can be removed by dynamically setting overflow:hidden CSS for the 〈body〉tag.
December 15, 2019
css
Disabling Pull-to-Refresh Feature on Mobile Browsers using CSS
Pull-to-refresh feature on mobile browsers that refreshes the page, can be disabled using the overscroll-behaviour CSS property.
December 14, 2019
html
Synchronous / Asynchronous Image Decode using〈img decoding〉Attribute
The "decoding" attribute can be included for an 〈img〉tag to specify whether to decode the image in parallel or along with the rest of the page content.
December 13, 2019
javascript
Preventing Addition of New Properties to a Javascript Object with Object.seal()
The Object.seal() method seals an object. After an object gets sealed, no new properties can be added to it.
December 12, 2019
javascript
Preventing Changes to a Javascript Object with Object.freeze()
The Object.freeze() method can make an object or array immutable. No changes can be made to that object once it gets immutable.
December 11, 2019
videos
Latest CSS Properties and APIs for Web Design in 2020 (VIDEO)
Many next generation CSS properties and APIs have been introduced in browsers lately. These can help in creation of user interfaces that were previously not possible or were difficult to achieve.
December 10, 2019
javascript
Hashbang Comments - The Third Way of Adding Comments in Javascript Code
Hashbang comments is the third type of syntax for adding comments to Javascript code. This comment can specify the Javascript interpreter that is to be used to execute the code within a script file or a module.
December 9, 2019
html
Loading CSS Stylesheet on Demand Through Its disabled Attribute
A stylesheet can include the disabled attribute in its markup to prevent it from being downloaded on page load. Later when the stylesheet needs to loaded on demand, its disabled attribute can be removed with Javascript.
December 3, 2019
javascript
Numeric Separators in Javascript to Improve Readability of Large Numbers
Numeric separators can be used to improve readability of large numbers. For example the number 111111111111111111111111, which is difficult to read, can be alternately written as 111_111_111_111_111_111_111_111
December 2, 2019
html
Preventing Autofilling the Password Field in HTML Forms
To prevent situations where we would not like the browser to autofill the password field in a form, the autocomplete=new-password attribute can be used.
December 1, 2019
New & Upcoming Javascript / Web Platform Features
Pan / Tilt / Zoom Support for Camera in getUserMedia()
Javascript Logical Assignment Operators
Intersection Observer Now Also Accepts a Document as the Root Element
Javascript String.replaceAll() Method
Better Caching With stale-while-revalidate Directive in Cache-Control Header
Synchronous AJAX Will Not Work in Page Dismissal Events
Javascript globalThis Property
Javascript Hashbang Comment Syntax