<?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: Yogesh Pant</title>
    <description>The latest articles on DEV Community by Yogesh Pant (@yogesh_992).</description>
    <link>https://dev.to/yogesh_992</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3971433%2F1eeae26c-00c9-410a-860b-3d2f90a93c01.png</url>
      <title>DEV Community: Yogesh Pant</title>
      <link>https://dev.to/yogesh_992</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yogesh_992"/>
    <language>en</language>
    <item>
      <title>Shallow Copy VS Deep Copy In Java Script : Explained in easiest way</title>
      <dc:creator>Yogesh Pant</dc:creator>
      <pubDate>Fri, 26 Jun 2026 10:19:51 +0000</pubDate>
      <link>https://dev.to/yogesh_992/shallow-copy-vs-deep-copy-in-java-script-explained-in-easiest-way-3dg5</link>
      <guid>https://dev.to/yogesh_992/shallow-copy-vs-deep-copy-in-java-script-explained-in-easiest-way-3dg5</guid>
      <description>&lt;h2&gt;
  
  
  What is copying and how does it Work in JS?
&lt;/h2&gt;

&lt;p&gt;In JavaScript, Copying is the process of making duplicate of of an existing values like integer, string, objects and function. &lt;br&gt;
However this is not so easy and straightforward as it looks. It all depends upon either you are copying primitive data types or non-primitive data types. If you are copying a primitive data type then it would be working with primary value but in the case of non-primitive data types it work with referenced values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lets see how it works with primary value and the referenced values&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Primitive Value (Copy By Value)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For primitive data types, there it is copy by value. &lt;br&gt;
Let me show this to you with the help of an example in code block by just simply declaring an integer "a" and copying its value in another integer "b".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;     &lt;span class="c1"&gt;// Copying the value&lt;/span&gt;

&lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;        &lt;span class="c1"&gt;// Changing b does NOT affect a&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Output: 10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see that changing value of b does not affecting a. This all happens because JavaScript creates a completely new independent copy of the actual values in the memory.&lt;/p&gt;

&lt;p&gt;On other hand primitive data types consist of &lt;code&gt;integers&lt;/code&gt;, &lt;code&gt;boolean values&lt;/code&gt;,&lt;code&gt;strings&lt;/code&gt;, &lt;code&gt;symbols&lt;/code&gt;, &lt;code&gt;bigInt&lt;/code&gt; and &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Non-Primitive Value (Copy By Reference)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For non- primitive data types, there it is copy by reference.&lt;br&gt;
Let it make clear with example of non-primitive data type object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;YOO&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Copying the reference!&lt;/span&gt;

&lt;span class="nx"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NEW&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "NEW" -&amp;gt; Oops! The original changed too.&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;In above code block there it is a object name original that is stored somewhere in memory, and variable hold a pointer(reference) to that location.&lt;br&gt;
If you are copying the variable you are just copying the pointer, not the actual referenced value.&lt;br&gt;
So, when you are changing the value in copied item it will change the actual value in it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;strong&gt;To solve this problem here comes the concept of Shallow Copy and Deep Copy:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here comes the golden rule to understand the difference between shallow copy and deep copy. &lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;A shallow copy copies the references.&lt;/li&gt;
&lt;li&gt;A deep copy copies the values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Its simple, let break it through analogy of pizza :&lt;/p&gt;

&lt;p&gt;-- &amp;gt; For shallow copy it is same as you and your friend is sharing a same     pizza. Whenever you and your friend eats pizza it shrinks. &lt;/p&gt;

&lt;p&gt;-- &amp;gt; For deep copy it is like you both owns different pizza. If your friend eats a slice, his pizza gets shrinks your remains untouched and same goes with your friend's pizza when you eats your pizza, his pizza remains untouched.&lt;/p&gt;

&lt;p&gt;And that's it , this is full concept that revolves around shallow copy and deep copy.&lt;br&gt;
Now lets get it through some examples of javascript.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Shallow Copy in JavaScript:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A shallow copy duplicates the top level of values. If there are some nested values it still copies it but only the referenced values.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using Spread Operator(...)&lt;/strong&gt; - 
This is one of the most common techniques used to make shallow copy in JavaScript.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;YOO&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;gender&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Male&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
 &lt;span class="p"&gt;};&lt;/span&gt; &lt;span class="c1"&gt;// Original named object.&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;copyOriginal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;  &lt;span class="c1"&gt;// making a shallow copy of original named object using spread operator.&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;copyOriginal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Output --&amp;gt; YOO&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But there is A Shallow trap, whenever it comes a nested values and copying through spread operator those nested values will share exactly same references. So changing these referenced values will also lead to the changes in actual values.&lt;/p&gt;

&lt;p&gt;To solve this problem here comes the concept of Deep Copy, lets learn this through some examples of javaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Deep Copy In JavaScript:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Deep Copy in JavaScript creates a differently new object to copy the actual values. Changes done in values of new copied objects are not displayed in the actual values. &lt;br&gt;
Let us see some methods to create a deep copy in JavaScript. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using built in function &lt;em&gt;structuredClone()&lt;/em&gt; :&lt;/strong&gt;
&lt;code&gt;StructuredClone()&lt;/code&gt; is a built in javaScript function that is available in all modern day browser and Node.js. It handles deep nested structure perfectly. It is built into the runtime(browser and node.js) and handles most complex data types smoothly.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;Teas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;            &lt;span class="c1"&gt;// Create a object named as tea with some values inside it&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Lemon tea&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;caffine&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;No&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tasty&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Yes&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;newTeas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;structuredClone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Teas&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Creating a deep copy of teas using structured clone method &lt;/span&gt;

&lt;span class="nx"&gt;newTeas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mango Tea&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Teas&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;//Output --&amp;gt; { name: 'Lemon tea', caffine: 'No', tasty: 'Yes' }&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newTeas&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//Output --&amp;gt; { name: 'Mango Tea', caffine: 'No', tasty: 'Yes' }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;PROS AND CONS&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros is that it is fast, native and correctly handles &lt;code&gt;Date&lt;/code&gt; ,&lt;code&gt;RegExp&lt;/code&gt; ,&lt;code&gt;maps&lt;/code&gt; and circular references.&lt;/li&gt;
&lt;li&gt;Cons is that it is will throw error when an object contain function or DOM nodes.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using JSON.parse(JSON.stringify()):&lt;/strong&gt;
Before &lt;code&gt;structuredClone()&lt;/code&gt; developers uses this trick to create a deep copy of object. It converts the object into a JSON string, then parse it back into brand-new object.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Yo!!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;nested&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;clone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why we should not use it?&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
The method strips out the data type that are not supported by JSON. IF your object contains &lt;code&gt;date&lt;/code&gt; , &lt;code&gt;undefined&lt;/code&gt; , &lt;code&gt;Null&lt;/code&gt;, &lt;code&gt;Map&lt;/code&gt;, &lt;code&gt;Set&lt;/code&gt; , or  &lt;code&gt;Infinity&lt;/code&gt;, they would either be lost or may be get corrupted or the value can be converted to &lt;code&gt;NULL&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;This is all about Deep Copy and Shallow Copy. Hope this gets you how and when to use shallow and deep copy method. JavaScript is full of such twist and turns. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Basics Of CSS (Cascading Style Sheet)</title>
      <dc:creator>Yogesh Pant</dc:creator>
      <pubDate>Sun, 07 Jun 2026 11:41:27 +0000</pubDate>
      <link>https://dev.to/yogesh_992/basics-of-css-cascading-style-sheet-746</link>
      <guid>https://dev.to/yogesh_992/basics-of-css-cascading-style-sheet-746</guid>
      <description>&lt;p&gt;CSS is basically used for styling the web page or the structure of the website. It is the stylesheet website use to enhance the style and presentation of the website. It works along HTML and JavaScript that plays vital role in building and making website more presentable.&lt;br&gt;
• HTML is use to make structure of the website.&lt;br&gt;
• CSS is use to style and make it more presentable.&lt;br&gt;
• JavaScript is use to make web page responsive.&lt;br&gt;
&lt;em&gt;CSS was released three after the HTML in 1996 with the main idea to sperate the content from presentation.&lt;/em&gt;  This makes website to be easily maintain and more flexible. The main focus of CSS is to design and style the web pages. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffxjvg1huyg74zqaetit1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffxjvg1huyg74zqaetit1.png" alt="Code snippit of sytlesheet" width="533" height="460"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Core Architecture and Mechanism :&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Separation of Concerns&lt;/strong&gt; : SoC in web pages means design of splitting the webpages into distinct sections, where each section manages each responsibility. There are three core layers:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Content layer : It is managed by HTML file. Web page structure is designed by HTML file.&lt;/li&gt;
&lt;li&gt;Presentation layer : It is managed by CSS file. Designing and presentation of web pages is done by CSS file.&lt;/li&gt;
&lt;li&gt;Behaviour layer : It is done using JavaScript file. JavaScript is used to make web page responsive.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cascading Order&lt;/strong&gt; : It resolves rules based on importance ,specificity , and source code. It resolves conflicts in a HTML file when multiple style rules target the same HTML elements. The browser reads rules from top to bottom filtering them through a strict hierarchy to determine which final style wins. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Targeted selectors&lt;/strong&gt; : It points to specific HTML nodes using tags, class and IDs. These combinations are parsed by browser from right to left, adding up their structural weights to create a final specificity score. &lt;br&gt;
Here it is how it works down :&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tag selector : It targets down the standard HTML elements nodes directly. They represents broad level and target specificity. It include tag like h1, div, p, button etc..&lt;br&gt;
---&amp;gt; How it works : The browser scan the documents and matches every nodes                             matching the exact same tag name. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;p {&lt;br&gt;
 font-variant: small-caps;&lt;br&gt;
 font-family : 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;              &lt;br&gt;
 font-size   :  medium;&lt;br&gt;
    }&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Class Selector : It target nodes that contain specific HTML strings in their HTML class attributes.&lt;br&gt;
&lt;em&gt;Syntax : .classname&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;.parent {&lt;br&gt;
        height : 250px;&lt;br&gt;
            display : flex;&lt;br&gt;
            flex-direction: column-reverse;&lt;br&gt;
            justify-content: start;&lt;br&gt;
            align-items: start;&lt;br&gt;
   }&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ID selector : Id selector targets a completely unique node on the HTML page. 
&lt;em&gt;Syntax : #idname&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;#child {&lt;br&gt;
            color-scheme: inherit;&lt;br&gt;
            font-style: italic;&lt;br&gt;
        }&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Box Model&lt;/strong&gt;: Box Model is the fundamental layout engine of CSS. It work upon the rectangular box type model where specific elements occupies space in the webpage. Further it is stacked into four layers together from inside out. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four layers of Box Model&lt;/strong&gt; :&lt;br&gt;
Every elements of box model contains these four parts :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Content : The inside more layer contains the actual texts, images, or   child elements.&lt;/li&gt;
&lt;li&gt;Padding : Padding is the internal clearing space between an elements actual content and its outer border.&lt;/li&gt;
&lt;li&gt; Border : It is the structural wrapping line that wrap around the elements padding and contents.&lt;/li&gt;
&lt;li&gt;Margin : It is completely transparent clearing space that pushes away the neighboring elements.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fcxyi81lr4jwpqtdk5ku6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fcxyi81lr4jwpqtdk5ku6.png" alt="CSS Box Model" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Layout and Presentation tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the broader space of CSS layout and presentation tools , Flexbox works alongside media typography center, Grid layout and Visual effects to present complete design ecosystem.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flexbox Layout&lt;/strong&gt; : Flexbox layout is a one dimensional layout that is designed to distribute space and align items along a single row or columns. It automatically shrinks or extend space to fill the available space, making it perfect to fill available screen space, making it perfect for responsive design.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;.parent {&lt;br&gt;
            display : flex;&lt;br&gt;
            flex-direction: column-reverse;&lt;br&gt;
            justify-content: start;&lt;br&gt;
            align-items: start;&lt;br&gt;
            flex-wrap: wrap;&lt;br&gt;
            gap: 20px;&lt;br&gt;
          }&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fk3euvap7ajzcl3b5h6k0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fk3euvap7ajzcl3b5h6k0.png" alt="CSS Flexbox layout" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Grid Layout&lt;/strong&gt; : Grid layout is two dimensional layout engine developed directly into CSS. Unlike flexbox which aligns into single dimension, Grid layout works upon two dimensions. Grid layout manages rows and columns layout simultaneously. This makes it most powerful tool to design and create webpages architecture, magazine style layout and complete dashboard type layout.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;.grid-container {&lt;br&gt;
  display: grid;&lt;br&gt;
  grid-template-columns: 200px 1fr 300px;&lt;br&gt;
  grid-template-rows: 100px 400px;&lt;br&gt;
  gap: 20px;&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.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%2F80m5cnyzs494m9bzveao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F80m5cnyzs494m9bzveao.png" alt="CSS Grid layout " width="800" height="362"&gt;&lt;/a&gt;&lt;br&gt;
3.&lt;strong&gt;Visual effects&lt;/strong&gt; : Visual effects in CSS represents flat, basic HTML structures into polished , interactive interfaces. Some of the features of it are :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Depth and Elevation (Shadows)&lt;/li&gt;
&lt;li&gt;Color Transitions (gradients)&lt;/li&gt;
&lt;li&gt;Layer Controls (Opacity &amp;amp; Blend Models)&lt;/li&gt;
&lt;li&gt;Image filters (filter)&lt;/li&gt;
&lt;li&gt;Backdrop Filters (backdrop-filter)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;.glass-modal {&lt;br&gt;
  background-color: rgba(255, 255, 255, 0.2); &lt;br&gt;
  backdrop-filter: blur(10px);    &lt;br&gt;
  border: 1px solid rgba(255, 255, 255, 0.1);&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;This is all about some basics of CSS layout. This is how it works to make web pages more attractive and separate the content of web pages from the design part of the web pages. CSS focuses upon styling the web page and make it look more attractive and interactive. Component of CSS play vital roles in developing web page more attractive.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
