<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Stephanie-dev</title>
    <description>The latest articles on DEV Community by Stephanie-dev (@stephaniedev).</description>
    <link>https://dev.to/stephaniedev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F853123%2F58ac79a8-9bab-4c07-a76e-ca36db2344a6.png</url>
      <title>DEV Community: Stephanie-dev</title>
      <link>https://dev.to/stephaniedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stephaniedev"/>
    <language>en</language>
    <item>
      <title>JavaScript: Understanding DOM</title>
      <dc:creator>Stephanie-dev</dc:creator>
      <pubDate>Mon, 06 May 2024 20:19:20 +0000</pubDate>
      <link>https://dev.to/stephaniedev/javascript-understanding-dom-43ic</link>
      <guid>https://dev.to/stephaniedev/javascript-understanding-dom-43ic</guid>
      <description>&lt;p&gt;Are you curious about how websites come to life? JavaScript is a powerful language that brings web pages to life. Well, today we're going to explore the Document Object Model (DOM), a crucial concept in web development.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Document Object Model (DOM)?
&lt;/h2&gt;

&lt;p&gt;DOM stands for Document Object Model. It's a standard way for programming languages (like JavaScript) to access and modify websites. &lt;br&gt;
The DOM is a programming interface for HTML and XML documents. It's a tree-like structure that represents the document's structure, allowing programs to dynamically access and manipulate the content, structure, and style of a document.&lt;/p&gt;

&lt;p&gt;There are three types of DOM:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Core DOM (for all document types)&lt;/li&gt;
&lt;li&gt;XML DOM (for XML documents)&lt;/li&gt;
&lt;li&gt;HTML DOM (for HTML documents)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'll be focusing on the HTML DOM.&lt;/p&gt;
&lt;h2&gt;
  
  
  The HTML DOM Tree: A Website's Building Blocks
&lt;/h2&gt;

&lt;p&gt;Imagine a website as a big tree with many branches. Each branch represents an HTML element (like a button or an image), and the tree is called the HTML DOM. JavaScript uses this tree to access and modify the website's content, style, and behavior. The DOM tree has a single root node, which is the document itself. From there, it branches out into various nodes, each representing an element, attribute, or text.&lt;/p&gt;
&lt;h3&gt;
  
  
  Nodes and Node Types
&lt;/h3&gt;

&lt;p&gt;In the DOM, each node has a specific type, which determines its behavior and properties. The most common node types are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element nodes (e.g., &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;,&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Attribute nodes (e.g.,&lt;code&gt;href&lt;/code&gt;, &lt;code&gt;src&lt;/code&gt;, &lt;code&gt;style&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Text nodes (e.g., the text content of an element)&lt;/li&gt;
&lt;li&gt;Document nodes (the root node of the DOM tree)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Node Relationships
&lt;/h4&gt;

&lt;p&gt;Nodes in the DOM tree have relationships with each other, which are crucial for navigating and manipulating the document. The most important relationships are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parent-child relationships (e.g., a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; element is the parent of its child elements)&lt;/li&gt;
&lt;li&gt;Sibling relationships (e.g., two&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; elements are siblings if they have the same parent)&lt;/li&gt;
&lt;li&gt;Ancestor-descendant relationships (e.g., a&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; element is an ancestor of its child and grandchild elements)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An illustration: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2s19scy9lr5qgwb4pyqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2s19scy9lr5qgwb4pyqv.png" alt="An image of the DOM Tree" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Now, what is HTML DOM?
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, JavaScript is a powerful language that brings web pages to life, and at the heart of its functionality lies the HTML Document Object Model (DOM).&lt;/p&gt;

&lt;p&gt;HTML DOM is a set of rules that defines how HTML elements (like buttons or images) are represented as objects. It's like a dictionary that explains how to access and modify website elements.&lt;/p&gt;
&lt;h3&gt;
  
  
  What Can HTML DOM Do?
&lt;/h3&gt;

&lt;p&gt;With HTML DOM, JavaScript can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the text or image on a website.&lt;/li&gt;
&lt;li&gt;Change the website's colors and layout.&lt;/li&gt;
&lt;li&gt;React to user interactions (like clicks or hover effects).&lt;/li&gt;
&lt;li&gt;Add or remove website elements.&lt;/li&gt;
&lt;li&gt;Create new events (like animations or pop-ups).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Put simply, HTML DOM is like an instruction manual for JavaScript to understand and manipulate websites.&lt;/p&gt;
&lt;h3&gt;
  
  
  Interacting with the DOM
&lt;/h3&gt;

&lt;p&gt;JavaScript is the primary language for interacting with the DOM. It provides various methods and properties for accessing, creating, and manipulating nodes in the DOM tree. Some common examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;document.getElementById()&lt;/code&gt; to retrieve an element node by its ID/&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;document.createElement()&lt;/code&gt; to create a new element node.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;node.appendChild()&lt;/code&gt; to add a child node to an element node.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;node.style&lt;/code&gt; to access and modify an element's CSS styles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some examples:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1. &lt;code&gt;document.getElementById()&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="myDiv"&amp;gt;Hello World!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myDiv = document.getElementById("myDiv");
console.log(myDiv); // Output: &amp;lt;div id="myDiv"&amp;gt;Hello World!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;2. &lt;code&gt;document.createElement()&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const newParagraph = document.createElement("p");
newParagraph.textContent = "This is a new paragraph.";
console.log(newParagraph); // Output: &amp;lt;p&amp;gt;This is a new paragraph.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;3. &lt;code&gt;node.appendChild()&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="myDiv"&amp;gt;Hello World!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myDiv = document.getElementById("myDiv");
const newParagraph = document.createElement("p");
newParagraph.textContent = "This is a new paragraph.";
myDiv.appendChild(newParagraph);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="myDiv"&amp;gt;Hello World!&amp;lt;p&amp;gt;This is a new paragraph.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;4. &lt;code&gt;node.style&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="myDiv" style="background-color: red;"&amp;gt;Hello World!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myDiv = document.getElementById("myDiv");
myDiv.style.backgroundColor = "blue";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="myDiv" style="background-color: blue;"&amp;gt;Hello World!&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;HTML DOM is a powerful tool that helps JavaScript create dynamic and interactive websites. Understanding HTML DOM is crucial for web development, and it opens up endless possibilities for creative and engaging web experiences.&lt;/p&gt;

&lt;p&gt;Please like and share your comments below 🤗&lt;/p&gt;

&lt;p&gt;Learn, Code, Repeat!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>CSS Cascade, Specificity, and Selectors</title>
      <dc:creator>Stephanie-dev</dc:creator>
      <pubDate>Sun, 21 Apr 2024 13:35:52 +0000</pubDate>
      <link>https://dev.to/stephaniedev/css-cascade-specificity-and-selectors-2jan</link>
      <guid>https://dev.to/stephaniedev/css-cascade-specificity-and-selectors-2jan</guid>
      <description>&lt;p&gt;Have you wondered why certain CSS rules you apply, be it inline, internal or external, do not reflect on your live server/website as a newbie, even as a knowledgeable techie?&lt;/p&gt;

&lt;p&gt;I have wondered too, don't worry.&lt;/p&gt;

&lt;p&gt;We'll be delving into various terminologies and rules that apply to CSS. It might be a lot but with time, you will understand....like I did.&lt;/p&gt;

&lt;p&gt;First, let's look at what CSS means.&lt;/p&gt;

&lt;p&gt;CSS means Cascading Style Sheets. It is a language used to style your markup document or page, also known as HTML (Hyper Text Markup Language) page.&lt;/p&gt;

&lt;p&gt;We have three types of CSS. They are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inline CSS&lt;/li&gt;
&lt;li&gt;Internal CSS&lt;/li&gt;
&lt;li&gt;External CSS&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Inline CSS: This is the CSS or style applied to a unique element in your HTML document. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example,&lt;/p&gt;

&lt;p&gt;In your HTML document, you have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is a document&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How do you apply your inline CSS?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1 style="color:red;"&amp;gt;This is a document&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;style="color:red;"&lt;/code&gt; tells the browser that the text in the &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; element should be red.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Internal CSS: This defines a style for a single HTML page. It is usually defined in an HTML page's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section, within a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; element.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="utf-8"&amp;gt;
&amp;lt;style&amp;gt;
       h1{
             color:red;
          }
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  As you can see, instead of your CSS being in the body of your HTML document like the Inline CSS, it is in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section instead. This way, you can target all the elements you want to style in the &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag.
&lt;/h6&gt;

&lt;h6&gt;
  
  
  This is also recommended if you want to style your HTML documents separately.
&lt;/h6&gt;

&lt;ul&gt;
&lt;li&gt;External CSS: This styles multiple HTML pages with a single style sheet linked to your HTML page with a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag. Your CSS rules are contained in a separate CSS file with a .css extension. &lt;em&gt;It must be linked to your HTML document to see the results&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="utf-8"&amp;gt;
&amp;lt;link rel="stylesheet" href="styles.css"&amp;gt;
&amp;lt;style&amp;gt;
       h1{
             color:red;
          }
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know these, why are my CSS rules not applying?&lt;/p&gt;

&lt;p&gt;Don't worry, we're here.&lt;/p&gt;

&lt;p&gt;Since we know what CSS is now, we will look at what CSS Cascade means.&lt;/p&gt;

&lt;p&gt;Cascade is the algorithm for solving conflicts where multiple CSS rules apply to an HTML element. This means it reconciles and applies the rules you declare for an element based on some factors.&lt;/p&gt;

&lt;p&gt;Understanding how the cascade algorithm works helps you understand why your codes aren't working and how the browser resolves such conflicts.&lt;/p&gt;

&lt;p&gt;The cascade algorithm is divided into four (4) stages.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;First stage - Position and order of appearance&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is simply the order in which your CSS rules appear.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1{
   Color:red;
  }

h1{
   Color:red;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, we have two &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;elements (selectors of identical specificity) telling the browser to apply certain colors to their texts. The browser will only obey the second rule and ignore the first since it's the last one to be declared.&lt;/p&gt;

&lt;p&gt;This can also apply to your internal CSS, inline CSS, and linked stylesheets.&lt;/p&gt;

&lt;p&gt;Some frontend developers often have two linked stylesheets in their HTML document or page. In this case, the browser picks the last linked stylesheet declared.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;Example/title&amp;gt;
&amp;lt;link rel="stylesheets" href="styles.css"&amp;gt;
&amp;lt;link rel="stylesheet" href="https://mdn.com...."&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser will pick the last declared linked stylesheet because it has more specificity. In a case where the browser cannot read the latest linked stylesheet or doesn't support it, it falls back to the first one declared.&lt;/p&gt;

&lt;p&gt;This also applies to your embedded &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag. If it comes before a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;tag, the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag will be picked first.&lt;/p&gt;

&lt;p&gt;The further down your CSS rules are declared, the more specific they become. Your browser will always pick the last CSS rule declared.&lt;/p&gt;

&lt;p&gt;An exception is your inline CSS. No matter the position of your inline CSS, it overrides all other CSS rules unless you give them an &lt;code&gt;!important&lt;/code&gt; declaration.&lt;/p&gt;

&lt;p&gt;Another scenario is where you apply the same rules to a specific element twice. You can declare the same properties with different values to a specific element but the last property and value will be applied.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1{
   color:red:
   color:blue;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result would be blue because it was the last rule to be declared and the most specific according to the browser.&lt;/p&gt;

&lt;p&gt;You might wonder why a developer would declare two rules, the same properties but different values, for one element. They do this so the browser can have a fallback option if it can't read or doesn't support the second rule declared.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second stage - Specificity
&lt;/h2&gt;

&lt;p&gt;Think of this stage as a math test grade. Your class takes a test and everyone is scored with different grades, from the lowest to the highest. Now, imagine prizes are given based on how each student did on the test.&lt;/p&gt;

&lt;p&gt;The highest scorer takes the biggest or highest prize and is seen as the most valued. Sure, other students are encouraged but the highest scorer takes the win.&lt;/p&gt;

&lt;p&gt;Let's apply it to this stage.&lt;/p&gt;

&lt;p&gt;Specificity is an algorithm that determines which CSS selectors are most specific through a scoring system to make those calculations.&lt;/p&gt;

&lt;p&gt;You might be wondering, "What is a CSS selector?"&lt;/p&gt;

&lt;p&gt;A CSS selector finds the HTML element(s) you want to style and applies the CSS rules you declare for it(them).&lt;/p&gt;

&lt;p&gt;There are different categories of CSS selectors, namely five (5):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simple selectors: these select elements based on element name, id, and class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Combinator selectors: these select elements based on a specific relationship between them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pseudo-class selectors: these select elements based on a certain state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pseudo-elements selectors: these select and style a part of an element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Attribute selectors: these select elements based on an attribute or attribute value.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'll be touching base on the simple and attribute selectors for this stage.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The simple selectors&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As mentioned earlier, they select HTML elements based on the element name, id, or class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Element name&lt;/strong&gt;: h1, p, div, span, button, section, article, and a are examples of element names. The list goes on and on.&lt;br&gt;
When styling with CSS, you pick any of the elements you want to style and give it a rule.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1{
   font-size:20px;
   text-align:center; 
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  &lt;em&gt;You're telling the browser that all &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; elements in your HTML document should have a font size of 20px and should be center-aligned.&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;Class selector&lt;/strong&gt;:This selector selects any element that has a specific class attribute. &lt;/p&gt;

&lt;p&gt;To select elements with a specific class attribute, you put a period(.), followed by the class name you gave the element.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML

&amp;lt;p class="text"&amp;gt;this is me&amp;lt;/p&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS

.text{ 
      color:pink;
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;You're telling the browser that any &lt;code&gt;.text&lt;/code&gt; element should have the color "pink".&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The class selector has a higher importance than the element name selector.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Id selector&lt;/strong&gt;:This selector uses the &lt;code&gt;id&lt;/code&gt; attribute of an HTML element to select a specific element. It is unique within a page. It has the most specificity. It is more important than any other selector and it overrides any other CSS rule you apply to the specific element if you have applied a CSS rule to the &lt;code&gt;id&lt;/code&gt; attribute.&lt;/p&gt;

&lt;p&gt;To select an element with a specific id, you write a hash (#) character, followed by the &lt;code&gt;id&lt;/code&gt; of the element.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML 

&amp;lt;p id="style"&amp;gt;style me&amp;lt;/p&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS

#style{
       background-color:black;
       color:white; 
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  &lt;em&gt;You're telling the browser that &lt;code&gt;#style&lt;/code&gt; element should have a &lt;code&gt;background-color&lt;/code&gt; of black and a font color of white.&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;In summary, id &amp;gt; class &amp;gt; element name.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Universal selector&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This selector selects all HTML elements to apply CSS rules.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
*{&lt;br&gt;
  background-color:grey;&lt;br&gt;
  font-size:16px;&lt;br&gt;
  color:green;&lt;br&gt;
 }&lt;/p&gt;
&lt;h6&gt;
  
  
  &lt;em&gt;You're telling the browser to apply these rules to all elements in your HTML page unless specified otherwise.&lt;/em&gt;
&lt;/h6&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Attribute selectors&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This selector targets elements with certain or specified attributes. It is usually denoted by two square brackets &lt;code&gt;[]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML

&amp;lt;a href="twitter.com" target="blank"&amp;gt;Twitter&amp;lt;/a&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS 

a[target] {
         Color:green;
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  &lt;em&gt;You're telling the browser to make any &lt;code&gt;a&lt;/code&gt; tag with the &lt;code&gt;target&lt;/code&gt;attribute have a font color of "green".&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;Why did I explain all these? To make you understand the importance of each selector and how they rank in CSS Specificity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back to specificity...
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, specificity determines which elements are most specific through a scoring program. This is so because you can have the same element targeted with the same properties but different values. The one with the higher specificity wins.&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;style&amp;gt;
    .test {color: green;}
    p {color: red;}
   #hello {color:blue;} 
  &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;p class="test" id="hello"&amp;gt;Hello World!&amp;lt;/p&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From explanations so far on simple selectors, which color do you think the browser would display?&lt;/p&gt;

&lt;p&gt;Answer: if you chose "Green", you're on the right path.&lt;/p&gt;

&lt;p&gt;If you chose "Red", I'll explain again.&lt;/p&gt;

&lt;p&gt;In the example above, we told the browser to give the class selector, &lt;code&gt;.test&lt;/code&gt;, a green color. We also told the browser to give the &lt;code&gt;p&lt;/code&gt; element a red color. Lastly, we told the browser to give the &lt;code&gt;#hello&lt;/code&gt; element a blue color. but the browser displayed a green text. Why? The &lt;code&gt;id&lt;/code&gt; selector has higher importance than the class and name selectors.&lt;/p&gt;

&lt;p&gt;Always remember: id &amp;gt; class &amp;gt; name&lt;/p&gt;

&lt;p&gt;Another way to know which selectors are more important than the other is by calculating their specificity values. &lt;/p&gt;

&lt;p&gt;Remember we mentioned it's calculated with a scoring program?&lt;/p&gt;

&lt;p&gt;Start at 0, add 1 for each element selector or pseudo-element, add 10 for each &lt;code&gt;class&lt;/code&gt; value, add 100 for each &lt;code&gt;id&lt;/code&gt; value (or pseudo-class or attribute selector), and 1000 for inline styles.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Breakdown:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* Selector has a specificity value of 0

.test or [href] has a specificity value of 10

#style has a specificity value of 100

&amp;lt;p style="color:red;"&amp;gt;two eggs&amp;lt;/p&amp;gt; (inline CSS has a specificity value of 1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Remember that inline CSS overrides all other CSS rules unless they have an &lt;code&gt;!important&lt;/code&gt; declaration. This is why it has a specificity value of 1000 and is the most important&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, the updated hierarchy would be: inline CSS &amp;gt; id &amp;gt; class &amp;gt; name&lt;/p&gt;

&lt;p&gt;Example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML

&amp;lt;p style="font-size:20px;" id="hello" class="text"&amp;gt;hello there!&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS

p {
   font-size:17px;
  }

#hello{
       font-size: 24px;
      }

.text{
      font-size:10px;
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What &lt;code&gt;font-size&lt;/code&gt; would the browser display?&lt;/p&gt;

&lt;p&gt;Answer: 20px&lt;/p&gt;

&lt;p&gt;Why, because inline CSS has more priority than any other selector in the stylesheet.&lt;/p&gt;

&lt;p&gt;Now, if I add an &lt;code&gt;!important&lt;/code&gt; declaration to one of the rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS

p {
   font-size:17px !important;
  }

#hello{
       font-size: 24px;
      }

.text{
      font-size:10px;
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What &lt;code&gt;font-size&lt;/code&gt; would the browser display?&lt;/p&gt;

&lt;p&gt;Specificity calculation question:&lt;br&gt;
What's the total score of this CSS rule?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a.test#style - &lt;/li&gt;
&lt;li&gt;p[class] - &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Answer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;a.test#style - 111&lt;/li&gt;
&lt;li&gt;p[class] - 11&lt;/li&gt;
&lt;/ol&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;Note: it's always a good idea to keep your selectors simple when styling so you can easily style or overwrite with other CSS rules.&lt;/em&gt;
&lt;/h6&gt;

&lt;h2&gt;
  
  
  Third stage - Origin
&lt;/h2&gt;

&lt;p&gt;The cascade takes into account the origin of the CSS because the CSS you write isn't the only CSS applied to a page.&lt;/p&gt;

&lt;p&gt;If you've used Dev Tools, you must have noticed some CSS rules that were applied by default. Those are the browser's internal stylesheets or styles added by your browser's extensions or operating system.&lt;/p&gt;

&lt;p&gt;The order of these origins from least specific to most specific:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;User agent base styles: these are default styles that your browser applies to HTML elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local user styles: these styles can come from your browser extensions that allow a user to write their own custom CSS for a webpage. They can also come from the operating system such as a default font size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authored CSS: This is the CSS that you write or author. This has higher importance than the user agent stylesheet and the local user stylesheet. It overrides both. This is the CSS you link to your HTML page with a &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag or embed with a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag in your head section or add to your HTML name elements (inline CSS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authored &lt;code&gt;!important&lt;/code&gt;: this is any &lt;code&gt;!important&lt;/code&gt; declaration that you add to your authored CSS rule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local user styles &lt;code&gt;!important&lt;/code&gt;: this is any &lt;code&gt;!important&lt;/code&gt; declaration that comes from the operating system or browser extensions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User agent &lt;code&gt;!important&lt;/code&gt;: any &lt;code&gt;!important&lt;/code&gt; that's defined in the default CSS provided by the browser.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Fourth stage - Importance
&lt;/h2&gt;

&lt;p&gt;CSS rules are also applied based on their level of importance.&lt;/p&gt;

&lt;p&gt;We'll be looking at the rank of importance from the least to the most important.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Normal rule type - background, color, or border.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;animation&lt;/code&gt; rule type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;!important&lt;/code&gt; rule type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Transition&lt;/code&gt; rule type &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;Animation&lt;/code&gt; rule type is more important than normal rule types because when an animation becomes active, its expected behavior changes its visual state and it overrides the normal rule type.&lt;/p&gt;

&lt;p&gt;Same with &lt;code&gt;transition&lt;/code&gt; rule types.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;CSS (Cascading Style Sheets) is a language used to style HTML documents. There are three types of CSS: Inline, Internal, and External. Understanding how CSS rules are applied is crucial, and it involves understanding the CSS Cascade, which is the algorithm for solving conflicts where multiple CSS rules apply to an HTML element.&lt;/p&gt;

&lt;p&gt;The CSS Cascade has four stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Position and order of appearance: The order in which CSS rules appear matters. The browser will apply the last rule declared.&lt;/li&gt;
&lt;li&gt;Specificity: This determines which CSS selectors are most specific through a scoring system. ID selectors have higher importance than class and name selectors. Ultimately, inline styles have the most priority.&lt;/li&gt;
&lt;li&gt;Origin: The origin of the CSS matters, with authored CSS having higher importance than user agent and local user styles. &lt;/li&gt;
&lt;li&gt;Importance: CSS rules are applied based on their level of importance, with animation and transition taking more priority because of the changes in visual state/behavior.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understanding these stages helps resolve conflicts and ensures that CSS rules are applied as intended.&lt;/p&gt;

&lt;p&gt;I hope you find this post useful when you face problems relating to CSS.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Share your thoughts in the comments below.&lt;/p&gt;

&lt;p&gt;Learn, code, repeat!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The Evolution of the Internet: The Journey Through Time</title>
      <dc:creator>Stephanie-dev</dc:creator>
      <pubDate>Thu, 04 Apr 2024 23:28:37 +0000</pubDate>
      <link>https://dev.to/stephaniedev/the-evolution-of-the-internet-the-journey-through-time-44i4</link>
      <guid>https://dev.to/stephaniedev/the-evolution-of-the-internet-the-journey-through-time-44i4</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi31qm9s5fmiq87a7pdob.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi31qm9s5fmiq87a7pdob.jpg" alt="Image of the Internet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;History of the Internet:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Welcome to a journey through the history of the internet, a technological marvel that has revolutionized the way we communicate, work, and live. From its humble beginnings in the Cold War era to the ever-present network we know today, the internet has undergone a remarkable evolution, driven by the innovation and collaboration of countless visionaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Cold War Era: Setting the Stage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The internet's story begins in the 1950s and 1960s, during the Cold War between the United States and the Soviet Union. In response to the fear of nuclear attacks, both nations sought to develop advanced science and technology capabilities. It was during this period that the concept of a network of interconnected computers was born.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From Mainframes to Networks: A New Era Dawns&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At the time, computers were massive mainframe machines that occupied entire rooms and were very expensive. Researchers had to travel long distances to access these computers, which could only perform specific tasks. To address this challenge, the idea of connecting computers to enable communication and resource sharing emerged.&lt;/p&gt;

&lt;p&gt;The first method of transferring data between computers, known as Circuit Switching, had limitations. All data had to be sent in a single packet, and any interruption would cause the entire transfer to fail. To overcome this, Packet Switching was developed. This method allowed data to be broken into smaller segments, ensuring that even if one segment failed to transmit, the rest could continue without interruption or starting over.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck2wtchdi5y0j5qd4flx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck2wtchdi5y0j5qd4flx.jpg" alt="Early mainframe computer"&gt;&lt;/a&gt;                         &lt;em&gt;Early mainframe computer&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ARPANET: The Birth of the Internet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In 1969, the first computers communicated over ARPANET, the Advanced Research Projects Agency Network, from UCLA to SRI in California. Initially connecting just four nodes, ARPANET rapidly expanded to enable research universities to share data and resources. Lawrence Roberts played a pivotal role in the development of ARPANET, proposing and leading the project for many years.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcd3rtrr16zd659ie2lye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcd3rtrr16zd659ie2lye.png" alt="ARPANET map in 1962 and how it advanced in 1982"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;ARPANET map in 1962 and how it advanced in 1982&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Birth of TCP/IP: A Universal Language for Communication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As other networks emerged, the need for a universal communication standard became apparent. Transmission Control Protocol (TCP) and Internet Protocol (IP) were developed, providing a set of rules that allowed different networks to communicate with each other. This laid the foundation for the interconnected network of networks that we now know as the Internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DNS (Domain Name System): The Internet's Address Book&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you want to visit a friend's house, but you only have their name, not their address. DNS, or Domain Name System, is like the internet's address book. It translates human-readable domain names (like &lt;a href="http://www.example.com" rel="noopener noreferrer"&gt;www.example.com&lt;/a&gt;) into IP addresses (like 192.168.1.1) that computers use to communicate on the internet. Without DNS, you'd have to remember long strings of numbers to access websites, which would be like trying to find your friend's house without an address!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The World Wide Web: Connecting the World&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With DNS and all these other developments in place, the stage was set for the introduction of the World Wide Web. In 1991, Tim Berners-Lee introduced the World Wide Web, forever changing the way we access and share information. The Web allowed users to navigate resources using Uniform Resource Locators (URLs), serving as an address for locating data on the internet. The Web also introduced HyperText Transfer Protocol (HTTP) for downloading linked resources and HyperText Markup Language (HTML) for formatting web pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FTP, HTTP, HTTPS: The Language of the Web&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;FTP (File Transfer Protocol) is like a courier service for the internet. It's used to transfer files between computers, such as uploading a website's files to a server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTP (Hypertext Transfer Protocol) is the protocol used for transferring web pages from servers to your browser. It's the language of the web, allowing you to click on links and navigate between pages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTTPS (Hypertext Transfer Protocol Secure) is like HTTP, but with added security. It encrypts data transferred between your browser and the server, keeping your information safe from hackers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How Do Network Packets Work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're mailing a letter. You write your message, put it in an envelope, and write the recipient's address on it. In computer networks, data is sent in packets, similar to envelopes. Each packet contains a piece of the message, along with the sender and recipient's addresses. These packets travel independently across the network and are reassembled at the destination, ensuring that even if some packets are lost or delayed, the message still gets through to the right destination.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwiqw143dmbfm1gqgv7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwiqw143dmbfm1gqgv7z.png" alt="Network packet"&gt;&lt;/a&gt;                                                      &lt;em&gt;Network packet&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion: A Bright Future Ahead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we reflect on the incredible journey of the internet, from its origins in the Cold War era to this present-day, one thing is clear: the internet has transformed the world in ways we never thought possible. As we look to the future, the possibilities are limitless, and the evolution of the internet continues to shape our world in ways we can only imagine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgid298jzk3f2nj5pxpb5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgid298jzk3f2nj5pxpb5.jpg" alt="Image of endless possibilities with the use of the Internet"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Image of endless possibilities with the use of the Internet&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>internet</category>
      <category>frontend</category>
      <category>writing</category>
    </item>
  </channel>
</rss>
