Web Developer Notes - Page 7

html

How to Add a Favicon to a Website

Last updated: 05.04.2026
Views: 303
A favicon (short for “favorite icon”) is a small graphical icon associated with a website. It is displayed in browser tabs, bookmarks, history lists, and sometimes in search results, helping users quickly recognize and identify a site. Favicons serve both a functional and branding purpose by improving navigation and making a website visually distinct. In the past, the .ico format was commonly u...
code

How to Remove WWW From a Website Address

Last updated: 05.04.2026
Views: 467
When setting up a website, one of the small but important technical details is choosing a preferred domain version — with or without “www”. From an SEO perspective, this decision matters because search engines may treat these versions as separate URLs if they are not properly configured. This can lead to duplicate content issues, split ranking signals, and weaker overall visibility in search resul...
JavaScript

How to Сlone (Copy) Object and Array in JavaScript

Last updated: 21.02.2026
Views: 226
Cloning objects and arrays is not as simple a topic as it may seem at first glance. Cloning objects and arrays in JavaScript can be done using various methods depending on the complexity (shallow vs. deep cloning). Cloning an Array 1. Using the Spread Operator (...): [js] const originalArray = [1, 2, 3]; const clonedArray = [...originalArray]; console.log(clonedArray); // Output: [1, 2, 3]...
css

How to Center an Element Vertically Using CSS (Vertical Alignment)

Last updated: 21.02.2026
Views: 274
There are several ways of vertical alignment. In different situations, different ways are suitable. Consider some of them. 1. Using Flexbox The easiest and most widely used method: [css] .container { display: flex; align-items: center; /* Centers vertically */ justify-content: center; /* Optional: Centers horizontally */ height: 100vh; /* Full viewport height, if needed. Or set you...
JavaScript

Countdown Timer in JavaScript

Last updated: 02.04.2026
Views: 309
Countdown timers are commonly used on websites that promote products, services, or special offers. You can often see them on landing pages or in online stores, where they are used to highlight limited-time deals and create a sense of urgency. By showing how much time is left until a specific event or deadline, such timers can help increase user engagement and encourage faster decision-making. I...