<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[VrajSoni.Blogs]]></title><description><![CDATA[VrajSoni.Blogs]]></description><link>https://blog.sonivraj.com</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 23:20:03 GMT</lastBuildDate><atom:link href="https://blog.sonivraj.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[CSS Selectors 101: How to Speak to Your HTML]]></title><description><![CDATA[Imagine you have just finished building the skeleton of your website using HTML. It’s all there headers, paragraphs, images, and link but it looks plain. Boring. You know CSS is the magic wand that will add color, layout, and style, but you’re stuck ...]]></description><link>https://blog.sonivraj.com/css-selectors-101-how-to-speak-to-your-html</link><guid isPermaLink="true">https://blog.sonivraj.com/css-selectors-101-how-to-speak-to-your-html</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Cohort2026]]></category><category><![CDATA[weed delivery michigan]]></category><category><![CDATA[#HiteshChaudhary ]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Sun, 15 Feb 2026 12:14:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1771157634806/1d44209a-6bb0-4753-9e04-f80fbb62c070.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Imagine you have just finished building the skeleton of your website using HTML. It’s all there headers, paragraphs, images, and link but it looks plain. Boring. You know CSS is the magic wand that will add color, layout, and style, but you’re stuck on the first crucial step:</p>
<p><strong>How do you tell CSS <em>exactly which</em> part of the page you want to change?</strong></p>
<p>You might want one paragraph to be big and blue, but another paragraph to be small and gray. How does the browser know the difference?</p>
<p>This is where <strong>CSS Selectors</strong> come in. If HTML is the raw material and CSS are the styling instructions, then Selectors are the bridge between them. They are the foundation of CSS; without them, you cannot style anything.</p>
<p>In this guide, we will break down the essential ways to target your elements.</p>
<hr />
<h2 id="heading-the-crowded-room-analogy">The "Crowded Room" Analogy</h2>
<p>To understand how selectors work, let's imagine your HTML document is a crowded banquet hall filled with hundreds of people (elements). You are standing on a stage with a microphone (the CSS file), and you need to give instructions to specific people.</p>
<p>How you address them determines who listens.</p>
<ol>
<li><p><strong>Broad:</strong> If you shout, <strong>"Hey, human!"</strong> everyone in the room will look up. It’s too broad.</p>
</li>
<li><p><strong>Specific Group:</strong> If you shout, <strong>"Everyone wearing a red shirt, stand up!"</strong> only a specific group will respond.</p>
</li>
<li><p><strong>Unique Individual:</strong> If you shout, <strong>"John Smith at Table 9, come to the stage!"</strong> only one very specific person will move.</p>
</li>
</ol>
<p>CSS selectors work exactly the same way. Let’s look at the three core selectors in that order.</p>
<hr />
<h2 id="heading-the-core-selectors">The Core Selectors</h2>
<h3 id="heading-1-the-element-selector-the-broad-shout">1. The Element Selector (The Broad Shout)</h3>
<p>This is the simplest selector. It targets every single instance of an HTML tag on your page.</p>
<ul>
<li><p><strong>Analogy:</strong> "Hey, human!"</p>
</li>
<li><p><strong>When to use it:</strong> Setting site-wide defaults, like the base font size for all paragraphs or removing default margins from the page body.</p>
</li>
</ul>
<p><strong>How it works:</strong> You just write the name of the HTML tag without brackets.</p>
<p><strong>HTML:</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is paragraph one.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is paragraph two.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"><span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">color</span>: darkblue;
  <span class="hljs-attribute">font-size</span>: <span class="hljs-number">18px</span>;
}
</code></pre>
<p><strong>Result:</strong> <em>Both</em> paragraphs on the page turn dark blue and become 18px size.</p>
<h3 id="heading-2-the-class-selector-the-specific-group">2. The Class Selector (The Specific Group)</h3>
<p>The Element selector is often too blunt. What if you want most paragraphs to be plain, but you want a specific few to look like "warning" notes?</p>
<p>You use a <strong>Class</strong>. Classes are attributes you add to your HTML to categorize elements. You can use the same class name on as many elements as you want.</p>
<ul>
<li><p><strong>Analogy:</strong> "Everyone wearing a red shirt."</p>
</li>
<li><p><strong>Syntax:</strong> In CSS, a class selector <strong>always starts with a dot (</strong><code>.</code>).</p>
</li>
</ul>
<p><strong>HTML:</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a normal paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"warning-text"</span>&gt;</span>Be careful! This is important.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Another normal paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"warning-text"</span>&gt;</span>Don't forget to save your work.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p><strong>CSS</strong>:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.warning-text</span> {
  <span class="hljs-attribute">color</span>: red;
  <span class="hljs-attribute">font-weight</span>: bold;
}
</code></pre>
<p><strong>Result:</strong> The first and third paragraphs remain plain. The second and fourth become bold and red.</p>
<blockquote>
<p><strong>Pro Tip:</strong> Classes are your best friend in CSS. Because they are reusable, they are the most common way to style web pages</p>
</blockquote>
<hr />
<h3 id="heading-3-the-id-selector-the-unique-individual">3. The ID Selector (The Unique Individual)</h3>
<p>Sometimes, there is an element on your page that is totally unique. There is only one of it. Think of your main website logo, or the main navigation header container.</p>
<p>For these, we use an <strong>ID</strong>.</p>
<ul>
<li><p><strong>Analogy:</strong> "John Smith at Table 9."</p>
</li>
<li><p><strong>The Golden Rule:</strong> An ID name <em>must</em> only be used once per page.</p>
</li>
<li><p><strong>Syntax:</strong> In CSS, an ID selector <strong>always starts with a hash/pound sign (</strong><code>#</code>).</p>
</li>
</ul>
<p><strong>HTML:</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"main-header"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>My Website<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p><strong>CSS:</strong></p>
<pre><code class="lang-css"><span class="hljs-selector-id">#main-header</span> {
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#333</span>; <span class="hljs-comment">/* Dark gray background */</span>
  <span class="hljs-attribute">color</span>: white;
  <span class="hljs-attribute">padding</span>: <span class="hljs-number">20px</span>;
}
</code></pre>
<p><em>Wait, shouldn't I just use a class?</em> Many modern developers prefer using classes even for unique elements just to keep things consistent. However, IDs are still useful, particularly if you need to target an element with JavaScript later. For styling, use IDs sparingly.</p>
<hr />
<h2 id="heading-working-smarter-combining-selectors">Working Smarter: Combining Selectors</h2>
<p>Once you master the big three, you can start combining them to write cleaner code.</p>
<h3 id="heading-group-selectors-dont-repeat-yourself">Group Selectors (Don't Repeat Yourself)</h3>
<p>Imagine you want your <code>&lt;h1&gt;</code>, <code>&lt;h2&gt;</code>, and paragraphs to all share the same font family. You <em>could</em> write three separate rules, but that's repetitive. Instead, group them using commas.</p>
<p><strong>CSS:</strong></p>
<pre><code class="lang-css"><span class="hljs-selector-tag">h1</span>, <span class="hljs-selector-tag">h2</span>, <span class="hljs-selector-tag">p</span> {
  <span class="hljs-attribute">font-family</span>: Helvetica, Arial, sans-serif;
  <span class="hljs-attribute">color</span>: <span class="hljs-number">#444</span>;
}
</code></pre>
<h3 id="heading-descendant-selectors-context-matters">Descendant Selectors (Context Matters)</h3>
<p>Sometimes you only want to style an element if it's <em>inside</em> another specific element.</p>
<p>Let's say you want all links (<code>&lt;a&gt;</code> tags) on your site to be blue. <em>Except</em> if the link is inside your dark footer—then you want it to be white so it's readable.</p>
<p>You use a <strong>space</strong> between selectors to indicate "inside of."</p>
<p><strong>HTML:</strong></p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Visit our <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>&gt;</span>contact page<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>

<span class="hljs-tag">&lt;<span class="hljs-name">footer</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"site-footer"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Copyright 2023. <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"#"</span>&gt;</span>Privacy Policy<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
</code></pre>
<p><strong>CSS</strong>:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">a</span> {
  <span class="hljs-attribute">color</span>: blue;
}

<span class="hljs-comment">/* Rule 2: Links INSIDE the footer id */</span>
<span class="hljs-selector-id">#site-footer</span> <span class="hljs-selector-tag">a</span> {
  <span class="hljs-attribute">color</span>: white;
}
</code></pre>
<h2 id="heading-who-wins-a-very-high-level-look-at-priority">Who Wins? A Very High-Level Look at Priority</h2>
<p>What happens if you have conflicting instructions?</p>
<p>Imagine your CSS has these two rules:</p>
<ol>
<li><p>An <strong>Element</strong> selector says all paragraphs (<code>p</code>) should be <strong>Gray</strong>.</p>
</li>
<li><p>A <strong>Class</strong> selector says paragraphs with the class <code>.special</code> should be <strong>Red</strong>.</p>
</li>
</ol>
<p>If you have <code>&lt;p class="special"&gt;Hello&lt;/p&gt;</code>, what color will it be?</p>
<p>It will be <strong>Red</strong>.</p>
<p>The browser follows a hierarchy of "Specificity." The more specific the selector, the more weight it carries.</p>
<ul>
<li><p><strong>Lowest Priority:</strong> Element selector (The broad shout to "humans")</p>
</li>
<li><p><strong>Medium Priority:</strong> Class selector (The group wearing "red shirts")</p>
</li>
<li><p><strong>Highest Priority:</strong> ID selector (The specific "John Smith")</p>
</li>
</ul>
<p>The browser always listens to the most specific instruction it can find for an element.</p>
<hr />
<h2 id="heading-summary">Summary</h2>
<p>CSS selectors are how you tell the browser what to style. You can't build a website without them.</p>
<ul>
<li><p>Start broad with <strong>Element</strong> selectors for defaults.</p>
</li>
<li><p>Use <strong>Class</strong> selectors for most of your styling needs (reusable groups).</p>
</li>
<li><p>Use <strong>ID</strong> selectors rarely for unique structural elements.</p>
</li>
<li><p>Remember that more specific selectors override broader ones.</p>
</li>
</ul>
<p>Mastering these basics is the first giant step toward making your websites look exactly the way you pictured them.</p>
]]></content:encoded></item><item><title><![CDATA[HTML Basics: The Skeleton of the Web]]></title><description><![CDATA[If you imagine a website as a human body, HTML (HyperText Markup Language) is the skeleton. Just as bones give a body structure and hold everything in place, HTML provides the structure for a webpage. It tells the browser where the headings go, where...]]></description><link>https://blog.sonivraj.com/html-basics-the-skeleton-of-the-web</link><guid isPermaLink="true">https://blog.sonivraj.com/html-basics-the-skeleton-of-the-web</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Web Dev 2026]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Fri, 30 Jan 2026 15:19:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769786293851/b222a722-a008-450a-a5d0-d7d163ff44ff.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you imagine a website as a human body, <strong>HTML (HyperText Markup Language)</strong> is the skeleton. Just as bones give a body structure and hold everything in place, HTML provides the structure for a webpage. It tells the browser where the headings go, where the paragraphs sit, and where images belong.</p>
<p>Without HTML, the web would just be a blob of unformatted text.</p>
<h2 id="heading-what-is-an-html-tag">What is an HTML Tag?</h2>
<p>Think of an HTML <strong>tag</strong> like a storage box.</p>
<ul>
<li><p>You have an <strong>opening tag</strong> (opening the box).</p>
</li>
<li><p>You put <strong>content</strong> inside (the stuff in the box).</p>
</li>
<li><p>You have a <strong>closing tag</strong> (taping the box shut).</p>
</li>
</ul>
<p>Tags are keywords surrounded by angle brackets, like <code>&lt;tagname&gt;</code>. They tell the browser <em>how</em> to display the content inside them.</p>
<h3 id="heading-the-anatomy-of-a-tag">The Anatomy of a Tag</h3>
<p>Here is the standard syntax:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a paragraph.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<ul>
<li><p><strong>Opening Tag:</strong> <code>&lt;p&gt;</code> (Starts the paragraph)</p>
</li>
<li><p><strong>Content:</strong> <code>This is a paragraph.</code> (The text you see on the screen)</p>
</li>
<li><p><strong>Closing Tag:</strong> <code>&lt;/p&gt;</code> (Ends the paragraph—notice the forward slash <code>/</code>)</p>
</li>
</ul>
<hr />
<h2 id="heading-tags-vs-elements-whats-the-difference">Tags vs. Elements: What's the Difference?</h2>
<p>New developers often use these terms interchangeably, but there is a distinct difference.</p>
<ul>
<li><p><strong>Tag:</strong> The code bits in the brackets (e.g., <code>&lt;h1&gt;</code> or <code>&lt;/h1&gt;</code>).</p>
</li>
<li><p><strong>Element:</strong> The <em>entire</em> package, from the opening tag to the closing tag, including the content inside.</p>
</li>
</ul>
<blockquote>
<p><strong>Formula:</strong> Opening Tag + Content + Closing Tag = <strong>HTML Element</strong></p>
</blockquote>
<h3 id="heading-visualizing-the-breakdown">Visualizing the Breakdown</h3>
<pre><code class="lang-xml">Element
┌──────────────────────────────┐
<span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span> Click Me <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
└─┬────┘ └──┬───┘ └───┬─────┘
Opening   Content   Closing
  Tag                 Tag
</code></pre>
<h2 id="heading-self-closing-void-elements">Self-Closing (Void) Elements</h2>
<p>Some elements don't hold content. Since they don't have "stuff" inside them, they don't need a closing tag. These are called <strong>self-closing</strong> or <strong>void</strong> elements.</p>
<p>Common examples:</p>
<ul>
<li><p><code>&lt;br&gt;</code>: Inserts a line break.</p>
</li>
<li><p><code>&lt;img&gt;</code>: Embeds an image.</p>
</li>
<li><p><code>&lt;hr&gt;</code>: Creates a horizontal line.</p>
</li>
</ul>
<h2 id="heading-block-level-vs-inline-elements">Block-Level vs. Inline Elements</h2>
<p>Understanding how elements sit on the page is crucial for layout.</p>
<h3 id="heading-1-block-level-elements">1. Block-Level Elements</h3>
<p>These are the "greedy" elements. They always start on a new line and take up the <strong>full width</strong> available (like a block stretching from left to right).</p>
<ul>
<li><p><strong>Examples:</strong> <code>&lt;div&gt;</code>, <code>&lt;h1&gt;</code>, <code>&lt;p&gt;</code>, <code>&lt;ul&gt;</code></p>
</li>
<li><p><strong>Visual:</strong> Imagine stacking cardboard boxes vertically on top of each other.</p>
</li>
</ul>
<h3 id="heading-2-inline-elements">2. Inline Elements</h3>
<p>These are the "social" elements. They do not start on a new line; they only take up as much width as necessary and sit happily next to other elements.</p>
<ul>
<li><p><strong>Examples:</strong> <code>&lt;span&gt;</code>, <code>&lt;a&gt;</code> (links), <code>&lt;b&gt;</code> (bold)</p>
</li>
<li><p><strong>Visual:</strong> Like words in a sentence flow from left to right.</p>
</li>
</ul>
<blockquote>
<p><strong>Analogy:</strong></p>
<ul>
<li><p><strong>Block elements</strong> are like houses on a street (each takes up a specific plot of land).</p>
</li>
<li><p><strong>Inline elements</strong> are like furniture inside the house (they sit next to each other within the space).</p>
</li>
</ul>
</blockquote>
<hr />
<h2 id="heading-commonly-used-tags">Commonly Used Tags</h2>
<p>Here are the essentials you will use 90% of the time:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Tag</strong></td><td><strong>Purpose</strong></td><td><strong>Type</strong></td></tr>
</thead>
<tbody>
<tr>
<td><code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code></td><td>Headings (<code>h1</code> is largest/most important).</td><td>Block</td></tr>
<tr>
<td><code>&lt;p&gt;</code></td><td>Paragraphs of text.</td><td>Block</td></tr>
<tr>
<td><code>&lt;a&gt;</code></td><td>Anchors (links to other pages).</td><td>Inline</td></tr>
<tr>
<td><code>&lt;img&gt;</code></td><td>Images.</td><td>Inline-block</td></tr>
<tr>
<td><code>&lt;div&gt;</code></td><td>A generic container for grouping content.</td><td>Block</td></tr>
<tr>
<td><code>&lt;span&gt;</code></td><td>A generic container for styling text.</td><td>Inline</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Understanding How Browser Works:]]></title><description><![CDATA[have you ever think that what happens what you write a URL on browser and click enter? The multi command process of million lines of code how does it render on your screen within milliseconds. In this blog I will tell you how does this process happen...]]></description><link>https://blog.sonivraj.com/understanding-how-browser-works</link><guid isPermaLink="true">https://blog.sonivraj.com/understanding-how-browser-works</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[#HiteshChaudhary ]]></category><category><![CDATA[Browsers]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Thu, 29 Jan 2026 17:15:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769706816121/14356172-9b02-49e5-a633-15874e6e2a5a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>have you ever think that what happens what you write a URL on browser and click enter? The multi command process of million lines of code how does it render on your screen within milliseconds. In this blog I will tell you how does this process happens beyond your screen.</p>
<h2 id="heading-what-is-browser"><mark>What is browser :</mark></h2>
<p>A browser is simply <strong>s</strong>oftware that lets you access, view, and interact with websites on the Internet. what browser does?</p>
<blockquote>
<p>What browser does ?</p>
<ul>
<li><p>It fetches data from web servers when you enter a URL</p>
</li>
<li><p>it downloads files such as HTML, images, text, video, etc., using protocols like HTTP/HTTPS.</p>
</li>
<li><p>it parser those files and render it on display .</p>
</li>
<li><p>it lets client to navigate in web page</p>
</li>
</ul>
</blockquote>
<h2 id="heading-main-parts-of-browser"><mark>Main parts of Browser :</mark></h2>
<ol>
<li><p><strong>UI (User Interface)</strong> : Ye woh parts hain jinke saath user interact karta hai. like tabs , address bars, navigation bar, bookmark bar, menu, settings etc.</p>
</li>
<li><p><strong>Browser Engine</strong>: UI aur rendering engine ke beech <strong>bridge</strong> ka kaam karta hai. Decide karta hai <strong>kab</strong>, <strong>kaise</strong> page load hoga.</p>
</li>
<li><p><strong>Rendering Engine</strong> : Ye engine code k<strong>o</strong> webpage me convert karta hai.</p>
</li>
<li><p><strong>javascript engine</strong>: Website ka logic &amp; interactivity yahin run hoti hai.</p>
</li>
<li><p><strong>Networking layer</strong>: Internet se baat karne ka kaam karta hai.</p>
</li>
<li><p><strong>Disk api</strong> : Browser locally data store karta hai for speed &amp; convenience.</p>
</li>
</ol>
<h2 id="heading-networking-how-a-browser-fetches-html-css-js"><mark>Networking: how a browser fetches HTML, CSS, JS</mark></h2>
<p>For now I will explain this in diagrammatic matter . read that image carefully to understand how browser works.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769705699508/7eaf1ea5-2f62-43ab-91bd-204c7ab1553f.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-dom-amp-cssom-creation"><mark>DOM &amp; CSSOM creation:</mark></h2>
<p>Dom is created while parsing HTML files and CSSOM is created while parsing CSS files. both works together while rendering inside browser. This 2 DOM and CSSOM meets inside render tree where their workflow is designed . after render tree the final frame is get constructed and then reflow and painting occurs then then the website is get displayed to user.</p>
<hr />
<p><strong><em><mark>Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.</mark></em></strong></p>
]]></content:encoded></item><item><title><![CDATA[Complete GIT in One Shot:]]></title><description><![CDATA[Why Version Control Exists: The Pendrive Problem
Version control exists to address several issues related to managing changes in files and projects, and one of the classic examples illustrating the need for version control is the "Pendrive Problem." ...]]></description><link>https://blog.sonivraj.com/complete-git-in-one-shot</link><guid isPermaLink="true">https://blog.sonivraj.com/complete-git-in-one-shot</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[#HiteshChaudhary ]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[#piyushgarag]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Thu, 29 Jan 2026 15:10:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769699392592/4eabbc79-e21f-4389-b404-3ef46174cdc5.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-why-version-control-exists-the-pendrive-problem"><mark>Why Version Control Exists: The Pendrive Problem</mark></h1>
<p>Version control exists to address several issues related to managing changes in files and projects, and one of the classic examples illustrating the need for version control is the "Pendrive Problem." This problem arises when multiple versions of a file are saved on different devices, such as USB drives (pendrives), leading to confusion and potential data loss.</p>
<p>The Pendrive Problem typically involves scenarios where:</p>
<ol>
<li><p><strong>Multiple Copies</strong>: Users create multiple copies of the same file on different pendrives or devices, making it difficult to track which version is the most recent or accurate.</p>
</li>
<li><p><strong>Collaboration Issues</strong>: When multiple people work on the same project, they might each have their own version of the files on separate pendrives, leading to conflicts and difficulties in merging changes.</p>
</li>
<li><p><strong>Data Loss</strong>: Without a centralized system to manage changes, important updates might be overwritten or lost if the wrong version is used or if a pendrive is misplaced.</p>
</li>
<li><p><strong>Lack of History</strong>: Without version control, there is no easy way to view the history of changes, making it challenging to revert to previous versions if needed.</p>
</li>
</ol>
<p>Version control systems, like Git, solve these problems by providing a centralized repository where all changes are tracked, allowing for easy collaboration, version tracking, and recovery of previous file states. This ensures that everyone is working on the most up-to-date version and that changes are systematically managed.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769698768896/a13b7cfa-03e5-4b68-b5e3-5d8b7c2124ad.png" alt class="image--center mx-auto" /></p>
<hr />
<h1 id="heading-understanding-git-the-inner-workings-and-importance-of-the-git-folder"><mark>Understanding Git: The Inner Workings and Importance of the .git Folder</mark></h1>
<h3 id="heading-definition-of-git">Definition of Git</h3>
<p>Git is a distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It allows multiple developers to work on a project simultaneously without interfering with each other's changes. Git tracks changes in the source code, enabling developers to collaborate and maintain a complete history of modifications, which can be used to revert to previous versions if necessary.</p>
<h3 id="heading-overview-of-the-git-folder">Overview of the .git folder</h3>
<p>The .git folder is a crucial component of a Git repository, acting as the database where all the metadata and object data for the project are stored. It contains all the information necessary for version control, including configurations, references to branches and tags, and the history of commits. The .git folder is typically located in the root directory of a Git repository and is hidden by default. Understanding the structure and contents of the .git folder is essential for managing and troubleshooting a Git repository effectively.</p>
<h3 id="heading-importance-of-understanding-the-git-folder">Importance of understanding the .git folder</h3>
<p>Understanding the .git folder is important because it is the backbone of a Git repository, containing all the data necessary for version control. By comprehending its structure and contents, developers can effectively manage and troubleshoot repositories. This knowledge helps in maintaining the integrity of the repository, resolving issues like corrupted data, and understanding how Git tracks changes. It also aids in performing advanced operations, such as manual recovery of lost commits, and ensures better collaboration and project management.</p>
<h1 id="heading-why-git-is-used"><mark>Why Git is used ?</mark></h1>
<p>In simple words we can refer git as a program that can track user code. It can track changes made by user in his code . It can tell when and where the change has been made by the user.In programming, multiple people can work on the same project. It is hard to track each person's code and then merge it into a single source of truth (which is the main project). Git is used to merge code from different people, track changes, and see who is working on the code.</p>
<h1 id="heading-git-basics-and-core-terminologies">Git Basics and Core Terminologies</h1>
<ol>
<li><p><strong>Repository (Repo):</strong> A storage location for your project, which includes all files and the history of changes made to them.</p>
</li>
<li><p><strong>Commit:</strong> A snapshot of changes made to the files in the repository. Each commit has a unique ID and records who made the changes and when.</p>
</li>
<li><p><strong>Branch:</strong> A separate line of development within a repository. Branches allow multiple people to work on different features or fixes simultaneously.</p>
</li>
<li><p><strong>Merge:</strong> The process of combining changes from different branches into a single branch.</p>
</li>
</ol>
<h1 id="heading-common-git-commands">Common Git Commands</h1>
<ol>
<li><p><strong>git init:</strong> Initializes a new Git repository in the current directory.</p>
</li>
<li><p><strong>git add [file]:</strong> Stages changes in the specified file for the next commit.</p>
</li>
<li><p><strong>git commit -m "[message]":</strong> Records the staged changes with a descriptive message.</p>
</li>
<li><p><strong>git status:</strong> Displays the state of the working directory and staging area.</p>
</li>
<li><p><strong>git log:</strong> This command shows the commit history for the repository. It lists all the commits made in the repository, along with details such as the commit ID, author, date, and commit message. It's helpful for reviewing the project's history and understanding the sequence of changes</p>
</li>
<li><p><strong>git revert:</strong> This command creates a new commit that undoes the changes made by a previous commit. Unlike <code>git reset</code>, which can alter the commit history, <code>git revert</code> maintains the history by adding a new commit that reverses the specified changes. It's useful for safely undoing changes in a collaborative environment.</p>
</li>
</ol>
<h1 id="heading-example">example</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769698547802/28c781be-23fe-4091-bb5e-fa9091e6f0e4.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[Two Protocols that runs the Internet: TCP vs UDP explained simply]]></title><description><![CDATA[Did you ever wonder that how does server makes a response to client when client makes some requests. This responses travels through some protocols those 2 protocols are known as TCP & UDP. They are simply just 2 protocols that moves data from one app...]]></description><link>https://blog.sonivraj.com/two-protocols-that-runs-the-internet-tcp-vs-udp-explained-simply</link><guid isPermaLink="true">https://blog.sonivraj.com/two-protocols-that-runs-the-internet-tcp-vs-udp-explained-simply</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Cohort2026]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[#HiteshChaudhary ]]></category><category><![CDATA[#piyushgarag]]></category><category><![CDATA[duplicates]]></category><category><![CDATA[#TCP #UDP #Networking #TechExplained #Protocols #DataTransfer #WebDevelopment #InternetTechnology #Coding #Programming #TechInsights #NetworkProtocols #TechTips #ComputerScience #TechForBeginners]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Wed, 28 Jan 2026 12:47:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769604716178/7fb4a905-92bd-4f94-ab1f-630148499323.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Did you ever wonder that how does server makes a response to client when client makes some requests. This responses travels through some protocols those 2 protocols are known as TCP &amp; UDP. They are simply just 2 protocols that moves data from one application to another .They both are transport layer protocols.</p>
<h3 id="heading-why-internet-needs-this-protocols"><mark>why internet needs this protocols ?</mark></h3>
<p>imagine internet as a massive highway . IP is that system which guides cars (data packets ) to move from one computer to another. IP is very basic system it just dumps the data to another computer and does not care about the data is reached or crashed or being theft. That is why we need Transport layer protocols to handles what happens after the data reaches the device. Without them the internet would be chaotic.</p>
<h2 id="heading-what-is-tcp"><mark>What is TCP?</mark></h2>
<p>Transmission Control Protocol (TCP) is a transport layer protocol , It is a standard that defines how to establish and maintain a network conversation through which application program exchanges data. if IP is a address system then TCP is a guarantee delivery service.</p>
<h3 id="heading-how-tcp-works"><mark>How TCP works?</mark></h3>
<p>Assume when we call someone from phone,</p>
<ul>
<li><p>we dial the number and say hello that is ( request connection )</p>
</li>
<li><p>then other person will say hello ( that’s acknowledge request)</p>
</li>
<li><p>you starts talking ( connection established)</p>
</li>
</ul>
<p>That was a real life scenario how does 3 way handshake connection establishes. but now lets talk about how TCP do this, the process known as <strong>3 way handshake</strong> :</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769260910689/7423f4b3-cfa7-4091-bad3-f3f895959784.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-features-of-tcp"><mark>Key Features of TCP:</mark></h3>
<ol>
<li><p><strong>Reliability</strong> : very time TCP sends a packet, it starts a timer. If the receiver doesn't send back an acknowledgment (ACK) saying "I got it" before the timer runs out, TCP assumes the packet was lost and resends it automatically.</p>
</li>
<li><p><strong>Order / Sequence</strong> : Data packets often take different routes across the internet and arrive out of order (e.g., Packet 3 arrives before Packet 2).TCP numbers every packet. The receiver uses these numbers to put them back in the correct order before handing the data to the app.</p>
</li>
<li><p><strong>Flow control</strong> : TCP manages the speed of data. If the receiver is overwhelmed, it tells the sender to slow down.</p>
</li>
<li><p><strong>Error checking</strong> : If the data is bad, TCP discards it and asks for a fresh copy.</p>
</li>
</ol>
<h3 id="heading-when-is-tcp-used"><mark>When is TCP used :</mark></h3>
<p>TCP is used in any application where accuracy is more important than speed. for example</p>
<blockquote>
<ol>
<li><p>web browsing ( we don’t want website showing incomplete texts )</p>
</li>
<li><p>emails</p>
</li>
<li><p>file transfer</p>
</li>
<li><p>Text messaging apps like WhatsApp</p>
</li>
</ol>
</blockquote>
<p>real world example for TCP are :</p>
<ul>
<li><p>open a website</p>
</li>
<li><p>Log in to an account</p>
</li>
<li><p>Send an email</p>
</li>
</ul>
<h2 id="heading-what-is-udp"><mark>What is UDP ?</mark></h2>
<p>User Datagram Protocol (UDP) is a transport layer protocol which is used to send data quickly. There is no confirmation weather data reached or not , is is just like throwing data to IP address and we hope that it arrives , UDP does not wait for confirmation and instantly send other data. there is no 3 way handshake process in this protocol.</p>
<h3 id="heading-how-does-udp-works"><mark>How does UDP works :</mark></h3>
<p>unlike TCP here there is no 3 way handshake connection , it simply just takes application data into small packets and attaches a very small header just to know where data is going and then it just sends data super quick.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769262245223/8224cf7b-3e23-4f7d-aa1f-83cc0bd52693.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-features-of-udp"><mark>Features of UDP:</mark></h3>
<ol>
<li><p><strong>Unreliable</strong> : UDP is often called a "Best Effort" service. If a packet drops due to network congestion, UDP does not resend it. The data is simply lost forever.</p>
</li>
<li><p><strong>unordered</strong> : If you send Packet A, then Packet B, they might arrive as B then A.</p>
</li>
<li><p><strong>Lightweight and high speed</strong></p>
</li>
<li><p><strong>no control flow</strong></p>
</li>
</ol>
<h3 id="heading-when-is-udp-used"><mark>When is UDP used :</mark></h3>
<blockquote>
<ul>
<li><p>Online gaming</p>
</li>
<li><p>video streaming</p>
</li>
<li><p>DNS</p>
</li>
</ul>
</blockquote>
<p>real life scenario of UDP is video streaming platform like Netflix , jiohotstar, games etc .</p>
<h2 id="heading-difference-between-tcp-amp-udp"><mark>Difference between TCP &amp; UDP :</mark></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769262588846/cd9d9662-f2ac-4630-bd46-092ea8dc308c.png" alt class="image--center mx-auto" /></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>TCP</strong></td><td><strong>UDP</strong></td></tr>
</thead>
<tbody>
<tr>
<td>It is Reliable</td><td>It is non Reliable</td></tr>
<tr>
<td>it is slow compared to UDP</td><td>it is very fast</td></tr>
<tr>
<td>guarantees Data transfer</td><td>no guarantee</td></tr>
<tr>
<td>do retransmission if data didn’t delivered properly</td><td>doesn’t do any retransmission</td></tr>
<tr>
<td>Flow control</td><td>No flow control</td></tr>
<tr>
<td>It follows order/sequence</td><td>doesn’t follow order</td></tr>
</tbody>
</table>
</div><h2 id="heading-what-is-http"><mark>What is HTTP:</mark></h2>
<p><strong>HTTP</strong> stands for <strong>HyperText Transfer Protocol</strong>. if TCP is delivery truck then HTTP is the order of delivering the packets . it defines the format and language that browsers and server talk to each other.</p>
<p>for eg: when we search <code>google.com</code></p>
<blockquote>
<ol>
<li><p><strong>HTTP</strong> creates a specific message: <em>"GET me the homepage."</em></p>
</li>
<li><p>it hands this message to <strong>TCP</strong> to deliver it safely.</p>
</li>
<li><p>The Server's <strong>TCP</strong> receives it and hands it to the Server's <strong>HTTP</strong></p>
</li>
<li><p>Server understands the message and sends back the website code (HTML).</p>
</li>
</ol>
</blockquote>
<h3 id="heading-where-does-it-fits"><mark>Where does it fits :</mark></h3>
<blockquote>
<ul>
<li><p>application layer</p>
</li>
<li><p>transport layer</p>
</li>
<li><p>network layer</p>
</li>
<li><p>physical layer : actual wifi radio waves or ethernet cables.</p>
</li>
</ul>
</blockquote>
<h3 id="heading-relationship-between-tcp-and-http"><mark>Relationship between TCP and HTTP :</mark></h3>
<p>HTTP has almost exclusively used TCP. When you load a webpage, you need the HTML, CSS, and JavaScript to arrive perfectly. If a line of JavaScript is missing (packet loss), the button on the site won't work. Therefore, HTTP relies on TCP's reliability.</p>
<hr />
<p><strong><em><mark>Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.</mark></em></strong></p>
]]></content:encoded></item><item><title><![CDATA[Getting Started with cURL]]></title><description><![CDATA[Have you ever wondered that how does a browser opens a website in our computer ? How does this complex process occurs within milliseconds and we as a user gets our desired output. For understanding this first we have to gain some knowledge about seve...]]></description><link>https://blog.sonivraj.com/getting-started-with-curl</link><guid isPermaLink="true">https://blog.sonivraj.com/getting-started-with-curl</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[curl]]></category><category><![CDATA[webbed]]></category><category><![CDATA[Devops]]></category><category><![CDATA[#HiteshChaudhary ]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Fri, 23 Jan 2026 18:11:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769191228467/9ba34395-cd74-4c0d-baea-a835e6779b93.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you ever wondered that how does a browser opens a website in our computer ? How does this complex process occurs within milliseconds and we as a user gets our desired output. For understanding this first we have to gain some knowledge about severs.</p>
<h2 id="heading-how-server-works">How Server works ?</h2>
<p>Server is a powerful computer that has 3 main job to do which is</p>
<blockquote>
<p>to store data</p>
<p>to process requests</p>
<p>to send response to client</p>
</blockquote>
<p>Server is a computer which works 24×7 hours , which is always connected to internet and which handles thousands or sometimes millions of clients.</p>
<p>while using our computer we talk to server many times and we didn’t even notice that thing. when and how we talk to server</p>
<blockquote>
<ul>
<li><p>opening a website</p>
</li>
<li><p>login into app</p>
</li>
<li><p>watch a video</p>
</li>
<li><p>send a message</p>
</li>
<li><p>save something</p>
</li>
</ul>
</blockquote>
<p>Our computer cannot do everything by itself. Consider our device as a client and server as a remote powerful computer.</p>
<p>How do Clients talk to servers ?</p>
<p>The clients talk to server by using some protocols HTTP/HTTPS , Request and responses and APIs. Every request will be looks like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769183531589/d651159b-025f-47a9-8cdf-67602f13ea43.png" alt class="image--center mx-auto" /></p>
<p>Now the big question arise is how does this requests goes to the server ? do developers send all requests manually ? So the answer is NO , developer doesn’t send requests manually . This is where <strong>cURL</strong> comes in.</p>
<h2 id="heading-what-is-curl"><mark>What is cURL ?</mark></h2>
<p>cURL means client URL . It is a command line tool that is used to</p>
<blockquote>
<ul>
<li><p>fetch data from URL</p>
</li>
<li><p>send request to server</p>
</li>
<li><p>test APIs</p>
</li>
<li><p>to debug backend services</p>
</li>
</ul>
</blockquote>
<h2 id="heading-why-we-need-curl"><mark>Why we need cURL ?</mark></h2>
<p>cURL is a way to talk with servers without browser. Because browser hides details such as IP,NS servers, etc , browsers can automates all things and are not good for testing APIs. So cURL is used we need it because:</p>
<blockquote>
<ul>
<li><p>fetch data from URL</p>
</li>
<li><p>check server response</p>
</li>
<li><p>sends GET,POST,PUT,DELETE requests</p>
</li>
<li><p>inspect header ,status codes , errors</p>
</li>
</ul>
</blockquote>
<h2 id="heading-sending-request-using-curl">Sending Request using cURL:</h2>
<p>The simplest possible way to fetch a website is</p>
<blockquote>
<p><code>curl http://chaicode.com</code></p>
</blockquote>
<p>it sends an HTTP GET request , downloads the HTML on webpage and prints it out in our terminal.</p>
<h2 id="heading-understanding-request-and-response"><mark>Understanding Request and Response:</mark></h2>
<p>After using that command <code>curl http://chaicode.com</code> cURL generates a request. A request has basically 4 parts;</p>
<blockquote>
<ol>
<li><p>method =&gt; GET</p>
</li>
<li><p>path =&gt; /</p>
</li>
<li><p>headers =&gt; database</p>
</li>
<li><p>body =&gt; to get response for GET</p>
</li>
</ol>
</blockquote>
<p>servers receives the request and gives a HTTP Response in the body. Response also has 3 parts :</p>
<blockquote>
<ol>
<li><p>status code</p>
</li>
<li><p>Headers</p>
</li>
<li><p>Body</p>
</li>
</ol>
</blockquote>
<h2 id="heading-how-curl-talks-to-apis"><mark>How cURL talks to APIs:</mark></h2>
<p>API is just a server endpoint that listens for HTTP requests , expects specific methods, body and gives response. cURL is a client that sends those requests exactly as API expects.</p>
<h2 id="heading-common-mistakes-beginners-make-with-curl">Common mistakes beginners make with cURL:</h2>
<blockquote>
<ol>
<li><p>forgetting the HTTP method</p>
</li>
<li><p>not setting content type</p>
</li>
<li><p>wrong quotes (in JSON)</p>
</li>
<li><p>forgetting Authentication Header</p>
</li>
<li><p>not checking status code</p>
</li>
<li><p>ignoring error messages</p>
</li>
<li><p>forgetting -v while debugging</p>
</li>
<li><p>expecting cURL to behave like a browser</p>
</li>
<li><p>copy pasting without understanding</p>
</li>
</ol>
</blockquote>
<hr />
<p><strong><em><mark>Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.</mark></em></strong></p>
]]></content:encoded></item><item><title><![CDATA[Understanding Network Devices]]></title><description><![CDATA[We use Internet everyday thanks to Jio but have you ever wondered how this internet actually reaches to our home or offices? Internet is a huge global network it is not a cloud nor a huge single machine but it is a huge network of networks. Like data...]]></description><link>https://blog.sonivraj.com/understanding-network-devices</link><guid isPermaLink="true">https://blog.sonivraj.com/understanding-network-devices</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[#HiteshChaudhary ]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Cohort2026]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[#piyushgarag]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Thu, 22 Jan 2026 14:27:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769091889272/9c7f96e5-2835-4320-b62c-41ceec93685c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We use Internet everyday thanks to Jio but have you ever wondered how this internet actually reaches to our home or offices? Internet is a huge global network it is not a cloud nor a huge single machine but it is a huge network of networks. Like data centres , servers, submarine cables, Fiber optic networks and many ISPs(Internet service providers like Jio, Airtel etc).</p>
<p>There are different roles of many network devices for providing internet to our home, offices, mobile phones. Let’s have a detailed discussion on them .</p>
<h2 id="heading-what-is-modem"><mark>What is Modem ?</mark></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769056718880/9be6ccd0-318c-4e18-8f39-6be432f0b005.png" alt class="image--center mx-auto" /></p>
<p>Modem is a device that connects our local network with ISPs by converting ISP signals into data that our device can understand.</p>
<h3 id="heading-why-do-we-need-modem">Why do we need modem ?</h3>
<p>Data transferred from ISP is in the form of signals that can be a light signal(fiber) , electrical signals (copper wires), or may be a radio signal (wireless). Our computer device only understands binary that is 0 &amp; 1 they can’t understand this signals.</p>
<p>So modem acts as a translator between our devices and ISP signals . It translates ISP signals into binary form so that our devices can understand it.</p>
<h2 id="heading-what-is-router"><mark>What is Router ?</mark></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769058163481/91b0ceca-b6ea-42cb-93da-c7e448e7c23d.png" alt class="image--center mx-auto" /></p>
<p>A router is a networking device that connects our local network to other networks (including internet) and decides where data packets should go. If modem brings the internet then router decides where should internet go. It connects 2 different networks WAN (internet/ISP side) and LAN(our local network). That is why it is called router it routes traffic between 2 network.</p>
<h3 id="heading-why-do-we-need-a-router">Why do we need a Router ?</h3>
<p>Router enables us to use one Internet connection in many devices securely and efficiently. Without router there should be no WiFi , no security layer , only one device can use internet but because of router now many device can access the same internet connection.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769060126049/488ddfa3-c503-4359-965b-7df25210ec7f.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-difference-between-modem-and-router">Difference between Modem and Router :</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td><mark>MODEM</mark></td><td><mark>ROUTER</mark></td></tr>
</thead>
<tbody>
<tr>
<td>It brings internet to our network.</td><td>It manages and shares the internet inside our network</td></tr>
<tr>
<td>It acts as a translator between ISP and our local network which translates ISP signals into binary 0&amp;1</td><td>It acts as a traffic distributor and manages traffic between local devices and internet</td></tr>
<tr>
<td>Provides raw internet access which only 1 device can use</td><td>It shares the internet across many devices.</td></tr>
<tr>
<td>It has no security but good efficiency</td><td>It has security and good efficiency for sharing data.</td></tr>
</tbody>
</table>
</div><h2 id="heading-switch-vs-hub"><mark>Switch vs Hub :</mark></h2>
<h3 id="heading-what-is-hub"><strong>What is hub?</strong></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769063332352/c5b900b8-3963-486f-96e8-24c8a996d89c.png" alt class="image--center mx-auto" /></p>
<p>Hub is a simple networking device that broadcast data to all connecting devices. In current era Hub is a dumb and old device because it just broadcasts all the data so there is no security, anyone can hear what data is sending to whom.</p>
<p>For eg</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769063789263/1baa9321-644b-4099-9f14-fbe4308cd39a.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-what-is-switch"><strong>What is SWITCH ?</strong></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769064017424/ef85324a-ea83-475c-9c86-d46fa47e9987.png" alt class="image--center mx-auto" /></p>
<p>A Switch is an intelligent LAN device that sends data only to the intended device( where user wants data to go). Switch actually knows who is connected and where is connected.</p>
<h3 id="heading-difference-between-hub-amp-switch"><mark>Difference between HUB &amp; SWITCH:</mark></h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td><mark>HUB</mark></td><td><mark>SWITCH</mark></td></tr>
</thead>
<tbody>
<tr>
<td>Hub broadcasts data to every devices</td><td>Switch sends data directly to the device</td></tr>
<tr>
<td>Chances of collision are very high</td><td>Almost no collision</td></tr>
<tr>
<td>Very poor security and speed</td><td>High speed and security</td></tr>
<tr>
<td>Doesn’t need MAC cable</td><td>It requires MAC cable to transfer data.</td></tr>
<tr>
<td>Almost no use today except in some companies</td><td>Heavily used in many companies</td></tr>
</tbody>
</table>
</div><h2 id="heading-fireball-the-security-guards"><em><mark>FIREBALL the security guards :</mark></em></h2>
<p>If routers are the brain of computer then fireball are security guards. Fireball is the security device or software that monitors , filters, and control network traffic based on predefined protocols. In short fireball allows what is allowed and what is it be blocked.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769068957129/c0618c0c-9ec9-4d60-98a8-447a6d1d7926.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-why-security-lives-here"><strong>Why “Security Lives Here”?</strong></h3>
<p>Every data packet entering or leaving the network must have passes through fireball. Fireball checks it according to security protocols and takes decision to allow it entering into network or blocked that data pack. Without fireball there would be no control into the network and it would become an open network which is very risky. Fireball are mostly built-in routers or often come as a separate device.</p>
<h2 id="heading-importance-of-load-balancer-in-real-systems"><mark>Importance of Load Balancer in real systems:</mark></h2>
<p>A load balancer is a system that distributes incoming traffic across multiple servers so that no single server gets overloaded. Sometime when there are so many users actively working on a site then the site crashes due to overload or sometime when servers are down then also site crashes . To overcome this situation we use load balancers. So that it distributes the traffic and releases load from the server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769069941154/b75e74a1-1d57-4ff0-aca2-c93868c72d84.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-all-these-network-devices-work-together-real-world-setup"><mark>All These Network Devices Work Together (Real-World Setup)</mark></h2>
<p>Internet signals coming from ISP’s entered into out networking system from modem. Then it is controlled by router and fireball. It travels inside LAN via switches and finally it is being scaled using load balancers.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769070527284/be467bf6-7029-439e-bdce-9eac6c8c0a36.png" alt class="image--center mx-auto" /></p>
<hr />
<p><strong><em><mark>Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.</mark></em></strong></p>
]]></content:encoded></item><item><title><![CDATA[Mastering DNS Record Types]]></title><description><![CDATA[DNS (Domain name system) is like the phonebook of internet. DNS converts website domain names into IP addresses. We as a Human it’s impossible to remember each and every IP address of a website we want to use. But it’s easy to remember domains. So we...]]></description><link>https://blog.sonivraj.com/mastering-dns-record-types</link><guid isPermaLink="true">https://blog.sonivraj.com/mastering-dns-record-types</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chai-code ]]></category><category><![CDATA[#HiteshChaudhary ]]></category><category><![CDATA[#piyushgarag]]></category><category><![CDATA[dns]]></category><category><![CDATA[dns resolver]]></category><category><![CDATA[dns-records]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[weed delivery NYC]]></category><category><![CDATA[chatgpt]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Wed, 21 Jan 2026 15:44:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769007393268/7d7c2276-32b9-4414-a51c-814c9d9e786c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>DNS (Domain name system) is like the phonebook of internet. DNS converts website domain names into IP addresses. We as a Human it’s impossible to remember each and every IP address of a website we want to use. But it’s easy to remember domains. So we introduce DNS it is an internet system that can changes our domain into IP addresses so that browser can open that website and we can do our work.</p>
<h2 id="heading-why-do-we-need-dns-record-types">Why do we need DNS Record Types</h2>
<p>DNS records are the information stored in DNS which shows</p>
<ul>
<li><p>Where the website is located</p>
</li>
<li><p>Where the emails would go</p>
</li>
<li><p>Who manages the domain</p>
</li>
</ul>
<p>Suppose we open a company name it as <strong>“SONI Pvt Ltd”</strong> . DNS records will be like for diffrent departments of our company.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Department</td><td>DNS Record</td></tr>
</thead>
<tbody>
<tr>
<td>Reception (website)</td><td>A / AAAA</td></tr>
<tr>
<td>Email team</td><td>MX</td></tr>
<tr>
<td>Branch office alias</td><td>CNAME</td></tr>
<tr>
<td>Admin office</td><td>NS</td></tr>
<tr>
<td>Notes &amp; rules</td><td>TXT</td></tr>
</tbody>
</table>
</div><h3 id="heading-why-each-dns-is-needed">Why each DNS is needed</h3>
<ol>
<li><p><strong>A/ AAAA record</strong></p>
<p> It opens the website of the company. Without it we can’t open the website of our company.</p>
</li>
<li><p><strong>MX record</strong></p>
<p> Without it emails cannot be reached to our company</p>
</li>
<li><p><strong>CNAME record</strong></p>
<p> Without CNAME we can’t have alliance like www.soni.com we can’t use www. Or we can we that without CNAME www and non-www cannot work together.</p>
</li>
<li><p><strong>NS</strong> <strong>record</strong></p>
<p> NS is the domain controller. Without NS the domain is dead and no record of our domain will be found.</p>
</li>
<li><p><strong>TXT record</strong></p>
</li>
</ol>
<p>Used for Email security, Domain ownership verification, security policy . Without TXT record all the emails will go to spam and DNS services like hostinger, godaddy can’t be able to verify our domain.</p>
<h2 id="heading-dns-record-types-explained-in-detail">DNS Record Types explained in detail:</h2>
<h3 id="heading-a-aaaa-records">A / AAAA Records</h3>
<p>A records maps a domain to IPv4 address. What is IPv4? It is basically an Internet Protocol Version 4. It is a foundational system that assign unique 32bits numerical address like 132.21.22… to devices enabling them to communicate over the internet by routing data packets across networks. though its limited address pool (around 4.3 billion) led to the development of IPv6 to handle the growing number of connected devices. And that’s how AAAA got introduced. They maps domain to IPv6 address. But AAAA have 128 bits of numerical address.</p>
<p>Here the role of A / AAAA records is to connect the domain lets say <code>Chaicode.com</code> and its unique IPv4 address lets say 13.12.1 together.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768978127384/366fba71-62e8-444a-ab43-2901ba75bafc.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-cname-records">CNAME Records:</h3>
<p>CNAME means canonical name. Cname makes one domain name an alias of other. Unlike A/ AAAA record it does not points to a IP address but it always point to another Domain name.</p>
<p>For eg. <code>www.chaicode.com</code> and <code>Chaicode.com</code> are 2 different names but using CNAME we can redirect the user to our original website i.e <code>Chaicode.com</code> also they both will have same IP address bcoz of CNAME.</p>
<p>CNAME avoids duplication of websites .</p>
<p><a target="_blank" href="http://chaicode.com"><code>chaicode.com</code></a> <code>A 203.0.113.25</code></p>
<p><a target="_blank" href="http://www.chaicode.com"><code>www.chaicode.com</code></a> <code>CNAME</code> <a target="_blank" href="http://chaicode.com"><code>chaicode.com</code></a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768983940117/3596bb59-e4fd-4fda-9c58-2ed648449d75.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-ns-records">NS records:</h3>
<p>NS records tells the browser that which DNS server are authoritative for our domain.</p>
<p><a target="_blank" href="http://chaicode.com"><code>chaicode.com</code></a> <code>NS</code> <a target="_blank" href="http://ns1.cloudflare.com"><code>ns1.cloudflare.com</code></a> <a target="_blank" href="http://chaicode.com"><code>chaicode.com</code></a> <code>NS</code> <a target="_blank" href="http://ns2.cloudflare.com"><code>ns2.cloudflare.com</code></a></p>
<p>NS records are stored at TLD server. We can check the NS by using <code>“dig chaicode.com NS”</code> in our terminal.What happens when you change NS?</p>
<p>Changing NS means:</p>
<ul>
<li><p>You switch DNS provider</p>
</li>
<li><p>Old DNS stops working</p>
</li>
<li><p>New DNS becomes source of truth</p>
</li>
</ul>
<p>⚠️ DNS propagation may take time (TTL).</p>
<h3 id="heading-mx-record">MX Record:</h3>
<p>MX means mail exchange record. It tells the browser that where the mails for our domain should deliver. For eg <code>hello@chaicode.com</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768985152552/1d334935-7b18-489e-ade6-3cccd5efd634.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-txt-records">TXT Records:</h3>
<p>TXT (Text) records store human readable instructions and proofs for a domain.<br />They’re mainly used for email security, domain verification, and policies.</p>
<p>Why TXT records exist?</p>
<p>DNS can’t just route traffic, it also needs to answer questions like:</p>
<ul>
<li><p>“Is this server allowed to send email for this domain?”</p>
</li>
<li><p>“Does this domain really belong to you?”</p>
</li>
<li><p>“How should email receivers treat suspicious mail?”</p>
</li>
</ul>
<p>TXT records are where these answers live.</p>
<p><strong>Types of TXT records:</strong></p>
<ol>
<li><p>SPF : it tells who is allowed to send emails at chaicode.com</p>
</li>
<li><p>DKIM: In this Emails are cryptographically signed. Receivers can verify authenticity.</p>
</li>
<li><p>DMARC: what to do if both SPF and DKIM fails ? Here comes the role of DMARC. If an email fails checks → quarantine it and send reports to Chaicode</p>
</li>
<li><p>Domain verification : to check that is domain is under control or not.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769008998940/9dfc03a4-f2b0-441a-80e2-afb2fbd3756d.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h2 id="heading-how-all-dns-records-work-together-for-the-same-website">How <strong>all DNS records work together for the same website?</strong></h2>
<p>Remember all DNS records dont do the same job. they all have different roles. Lets break it down to understand clearly.</p>
<ul>
<li><p>NS Record: tells that who manages the domain.</p>
</li>
<li><p>A/AAAA Record : locates the Website and give IP address to browser</p>
</li>
<li><p>CNAME Record: creates the alias like www.chaicode.com</p>
</li>
<li><p>MX Record: Check where emails are going</p>
</li>
<li><p>TXT record: checks weather the email is trusted / domain verified.</p>
</li>
</ul>
<p>Each record has a strict role todo that is why they dont clash with each other and works together for the same website. Website needs multiple DNS records to function properly.</p>
<hr />
<p><strong><em><mark>Thank you for reading . Have a happy learning journey. I hope this article added some value for your given precious time.</mark></em></strong></p>
]]></content:encoded></item><item><title><![CDATA[Understanding DNS Resolution]]></title><description><![CDATA[Before starting to our name resolution topic let me clear some basic terminology’s such as DNS and DNS resolution are 2 different things . They often used interchangeably in casual conversation, but they are different aspects of technology.
How are t...]]></description><link>https://blog.sonivraj.com/understanding-dns-resolution</link><guid isPermaLink="true">https://blog.sonivraj.com/understanding-dns-resolution</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[WebDevCohort2026]]></category><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[dns resolver]]></category><category><![CDATA[#piyushgarg]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[Vraj Soni]]></dc:creator><pubDate>Tue, 20 Jan 2026 05:51:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769006883919/50838427-549c-4b73-93f5-466de8ce5880.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<p>Before starting to our name resolution topic let me clear some basic terminology’s such as DNS and DNS resolution are 2 different things . They often used interchangeably in casual conversation, but they are different aspects of technology.</p>
<h3 id="heading-how-are-they-differ-from-each-other">How are they differ from each other</h3>
<p><strong>DNS (Domain Name System) :</strong> This is an entire system or Infrastructure itself. It is a global database that stores records and maps domain names to IP addresses. We can say it as a “Phonebook” of internet. For eg. Hostinger, GoDaddy, Versel etc.</p>
<p><strong>DNS Resolution :</strong> This is an active process or action of using that system to find answers. It is a multiple step process. Starting from user request through various servers like Root,TLD and Authorotative servers to resolve user request.</p>
<h2 id="heading-overview">Overview</h2>
<p>In this blog we will understand how this process of DNS Resolution works in detailed and simple way. Along with that we will understand about Dig and Dig commands.</p>
<h2 id="heading-how-dns-resolution-works">How DNS Resolution works</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768812214992/3225f2aa-1baa-4766-adc0-650da638cff9.jpeg" alt class="image--center mx-auto" /></p>
<p>Here are some simple steps how this whole process works.</p>
<ol>
<li><p>First the user requests the browser to open <code>Chaicode.com</code> in his browser. The browser searches for the domain in its cache if its not available there then It will take his request to <code>.com</code> domains list or we can say into Recursive DNS.</p>
</li>
<li><p>The recursive DNS will now search for the domain in its cache if its not there then it will redirect the request to <strong>Root Server</strong></p>
</li>
<li><p>The Root server will now tell the recursive DNS to go to this specific <strong>TLD(Top Level Domain)</strong> server that manages information for specific domain like <code>.com</code> , <code>.org</code> , <code>.gov</code> etc.</p>
</li>
<li><p>Now the Recursive DNS will go to the specific TLD server and will ask for <code>chaicode.com</code> .</p>
</li>
<li><p>The TLD server will provide us the NS(name server)</p>
</li>
<li><p>The Recursive DNS will go to the <strong>Authoritative DNS</strong> server to get the IP address for our website</p>
</li>
<li><p>Authoritative DNS will give IP address like 143.11.12.1 to our recursive DNS</p>
</li>
<li><p>Then it gives IP address to browser so that the user can get access for the Web site he wants.</p>
</li>
</ol>
<hr />
<h2 id="heading-unleashing-the-curiosity">Unleashing the Curiosity</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768848791895/2c618f47-1ccb-4332-9e54-885b5f304510.jpeg" alt class="image--center mx-auto" /></p>
<p>Ever wondered what if we can get the record of IP address also the name server of the website directly into our computer. Yes, we can do that thing using <strong>DIG (Domain Information Groper)</strong>. We just simply type the command <code>dig chaicode.com</code> in terminal or warp then it will directly tell us the IP address and DNS details for that website.</p>
<h3 id="heading-how-dig-works-and-what-is-role-of-dig">How dig works and what is role of DIG !</h3>
<p>DIG is a query tool that asks DNS servers about how a domain name get resolved to a IP address.</p>
<details><summary>How it works</summary><div data-type="detailsContent">Suppose we search for dig<code> Chaicode.com</code> then dig does not open the website like browser does but it will ask the DNS servers to tell us everything they know about this website. DIG let you see the conversation that how the browser sents query to root severs , which TLD server are included there and who is authoritative DNS server of that website and what is the IP address of that site.</div></details>

<h2 id="heading-some-useful-dig-commands">Some useful DIG commands</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768887492908/6885636b-0449-429e-9087-96fe932cba7d.png" alt class="image--center mx-auto" /></p>
<ol>
<li><h3 id="heading-digns">DIG.NS</h3>
<p> NS is a DNS record type. It indicates which server are responsible for the domain names. It show us the Authoritative server</p>
</li>
<li><h3 id="heading-dig-com-ns">dig com NS</h3>
<p> This shows DIG which is a query tool, <code>.com</code> which is a TLD and NS asks for name for that TLD where .com is available. It returns the TLD servers where .com is located.</p>
</li>
<li><h3 id="heading-dig-googlecom-ns">Dig google.com NS</h3>
<p> It finds the name server which are authoritative for the domain google.com it returns something like.</p>
<p> <a target="_blank" href="http://google.com"><code>google.com</code></a><code>. NS</code> <a target="_blank" href="http://ns1.google.com"><code>ns1.google.com</code></a><code>.</code></p>
<p> <a target="_blank" href="http://google.com"><code>google.com</code></a><code>. NS</code> <a target="_blank" href="http://ns2.google.com"><code>ns2.google.com</code></a><code>.</code></p>
<p> <a target="_blank" href="http://google.com"><code>google.com</code></a><code>. NS</code> <a target="_blank" href="http://ns3.google.com"><code>ns3.google.com</code></a><code>.</code></p>
</li>
<li><h3 id="heading-dig-googlecom">Dig google.com</h3>
<p> It asks DNS about the IP address of google.com also asks for the record type of the domain and its authoritative server . It also returns TTL seconds to reach the server. The output will look something like this. <a target="_blank" href="http://google.com"><code>google.com</code></a><code>. 300 IN A 142.250.182.14</code></p>
<p> <code>300</code> → TTL (seconds)</p>
<p> <code>A</code> → IPv4 record</p>
<p> <code>142.250.182.14</code> → IP address</p>
</li>
</ol>
<p>That’s it . Thank you for reading . Hope you understand the concepts well.</p>
]]></content:encoded></item></channel></rss>