<?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: ANSI KADEEJA </title>
    <description>The latest articles on DEV Community by ANSI KADEEJA  (@ansishahid).</description>
    <link>https://dev.to/ansishahid</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%2F3124105%2F52a76c18-ce4d-4cdf-80cd-9c4e81d7840f.jpg</url>
      <title>DEV Community: ANSI KADEEJA </title>
      <link>https://dev.to/ansishahid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ansishahid"/>
    <language>en</language>
    <item>
      <title>Getting Started with React</title>
      <dc:creator>ANSI KADEEJA </dc:creator>
      <pubDate>Mon, 16 Jun 2025 03:22:01 +0000</pubDate>
      <link>https://dev.to/ansishahid/getting-started-with-react-3ba6</link>
      <guid>https://dev.to/ansishahid/getting-started-with-react-3ba6</guid>
      <description>&lt;p&gt;React is a powerful and popular JavaScript library for building user interfaces. If you're new to React, you might be wondering how it works and what makes it special. In this blog, I’ll explain some of the most important basic concepts to help you get started: &lt;strong&gt;DOM&lt;/strong&gt; vs &lt;strong&gt;React&lt;/strong&gt; &lt;strong&gt;DOM&lt;/strong&gt;, &lt;strong&gt;SPA&lt;/strong&gt; vs &lt;strong&gt;MPA&lt;/strong&gt;, &lt;strong&gt;Class&lt;/strong&gt; vs &lt;strong&gt;Functional Components&lt;/strong&gt;, &lt;strong&gt;JSX&lt;/strong&gt;, and &lt;strong&gt;npm&lt;/strong&gt; vs &lt;strong&gt;npx&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📘 DOM vs React DOM&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DOM (Document Object Model)&lt;/strong&gt; is the browser’s representation of your HTML structure. JavaScript can interact with it using functions like &lt;code&gt;document.getElementById()&lt;/code&gt; to change content or style.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;React DOM&lt;/strong&gt; is a React-specific version that uses a &lt;strong&gt;Virtual DOM&lt;/strong&gt; to update the actual DOM more efficiently. Instead of reloading the entire page, React updates only the parts that change, making apps faster and smoother.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔁 SPA vs MPA&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SPA (Single Page Application):&lt;/strong&gt;&lt;br&gt;
In an SPA, the entire website loads one single HTML page. When the user interacts with the site, JavaScript updates the page without reloading it. React is designed to build SPAs.&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; Gmail, Facebook&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MPA (Multi Page Application):&lt;/strong&gt;&lt;br&gt;
An MPA loads a new HTML page every time a user clicks a link. The browser reloads completely. These are common in traditional websites.&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; Amazon, online banking sites&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🏗️ Class vs Functional Components&lt;/strong&gt;&lt;br&gt;
React allows you to build UI using &lt;strong&gt;components&lt;/strong&gt;, which are like reusable building blocks. There are two main types:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Class Components&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Written using JavaScript classes.&lt;/li&gt;
&lt;li&gt;Include &lt;strong&gt;lifecycle methods&lt;/strong&gt; like &lt;code&gt;componentDidMount()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Older but still valid.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Welcome extends React.Component {
  render() {
    return &amp;lt;h1&amp;gt;Hello, React!&amp;lt;/h1&amp;gt;;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;✨ Functional Components&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple JavaScript functions.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;Hooks&lt;/strong&gt; (like &lt;code&gt;useState&lt;/code&gt;, &lt;code&gt;useEffect&lt;/code&gt;) to manage state and side effects.&lt;/li&gt;
&lt;li&gt;Modern and preferred way of writing components.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Welcome() {
  return &amp;lt;h1&amp;gt;Hello, React!&amp;lt;/h1&amp;gt;;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;💡 What is JSX?&lt;/strong&gt;&lt;br&gt;
JSX stands for &lt;strong&gt;JavaScript XML&lt;/strong&gt;. It lets you write HTML-like code inside JavaScript, making your UI code more readable and powerful.&lt;br&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;const name = "Ansi";
const greeting = &amp;lt;h1&amp;gt;Hello, {name}&amp;lt;/h1&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JSX supports dynamic content using &lt;code&gt;{}&lt;/code&gt; and makes your code cleaner and easier to work with.&lt;br&gt;
&lt;strong&gt;📦 npm vs npx&lt;/strong&gt;&lt;br&gt;
📌&lt;strong&gt;npm (Node Package Manager)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used to install libraries or tools into your React project.&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;npm install react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;⚡ npx&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used to &lt;strong&gt;run packages&lt;/strong&gt; without permanently installing them.&lt;/li&gt;
&lt;li&gt;Helpful for tools like &lt;strong&gt;Create React App&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command sets up a new React project with all the required tools in seconds.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>100 Days of JavaScript🔥 – Day 2️⃣: Understanding Data Types &amp; Joining Text (Concatenation)</title>
      <dc:creator>ANSI KADEEJA </dc:creator>
      <pubDate>Sat, 31 May 2025 03:56:48 +0000</pubDate>
      <link>https://dev.to/ansishahid/100-days-of-javascript-day-2-understanding-data-types-joining-text-concatenation-16bm</link>
      <guid>https://dev.to/ansishahid/100-days-of-javascript-day-2-understanding-data-types-joining-text-concatenation-16bm</guid>
      <description>&lt;p&gt;Yesterday, we learned about variables – our "boxes" for holding information. Today, we'll look inside those boxes to understand the types of information they hold, and then we'll learn a super useful way to combine text: concatenation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understanding Data Types: The Kind of Information in Your Box
Think of it like this: different boxes hold different kinds of items. A box for toys is different from a box for fruit. In JavaScript, your variables also hold different types of data, and knowing the type helps you know what you can do with it.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Number&lt;/code&gt;: This is for any kind of number. It could be a whole number (like &lt;code&gt;7&lt;/code&gt;, &lt;code&gt;100&lt;/code&gt;), or a number with a decimal point (like &lt;code&gt;3.14&lt;/code&gt;, &lt;code&gt;2.5&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;let quantity = 50;&lt;/code&gt; &lt;code&gt;let temperature = 28.5&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;String&lt;/code&gt;: This is for text. Whenever you want to store words, sentences, or even just a single letter, you'll use a String. You create strings by putting the text inside single quotes (&lt;code&gt;'...'&lt;/code&gt;), double quotes (&lt;code&gt;"..."&lt;/code&gt;), or special backticks (...).&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;let movieTitle = "Inception"&lt;/code&gt;; &lt;code&gt;let city = 'Kuala Lumpur';&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Boolean&lt;/code&gt;: This is a simple type that holds only one of two values: &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. Booleans are essential for making decisions in your code (like "Is it raining?" - &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;let isRaining = false;&lt;/code&gt; &lt;code&gt;let userLoggedIn = true;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Undefined&lt;/code&gt;: This means a variable has been created (a box exists), but no value has been placed inside it yet. JavaScript automatically gives it the &lt;code&gt;undefined&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;let myAge; // myAge is undefined because nothing is assigned yet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Null&lt;/code&gt;: This is similar to &lt;code&gt;undefined&lt;/code&gt;, but it means you've intentionally said "there is no value here." You actively assign &lt;code&gt;null&lt;/code&gt; when you want to show that something is purposely empty or unknown.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;let selectedItem = null; // We explicitly say no item is chosen&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to Check the Type:&lt;/strong&gt;&lt;br&gt;
You can use the &lt;code&gt;typeof&lt;/code&gt; keyword to ask JavaScript what type of data is in a variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myFavNumber = 7;
let myHobby = "coding";
console.log(typeof myFavNumber); // Output: number
console.log(typeof myHobby);    // Output: string
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Concatenation: Joining Your Text Together!&lt;/strong&gt;&lt;br&gt;
 Concatenation is just a fancy word for joining two or more strings (pieces of text) into one longer string. It's like sticking different words or phrases together to form a complete sentence.&lt;/p&gt;

&lt;p&gt;There are a few main ways to concatenate strings in JavaScript:&lt;br&gt;
&lt;strong&gt;A. Using the &lt;code&gt;+&lt;/code&gt; Operator (The "Add" sign for Text)&lt;/strong&gt;&lt;br&gt;
You know &lt;code&gt;+&lt;/code&gt; for adding numbers. But for strings, it works like a "glue" to stick them together!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Sticking two strings together
let part1 = "Hello";
let part2 = "World";
let fullMessage = part1 + part2;
console.log(fullMessage); // Output: HelloWorld (Notice, no space!)

// Adding a space manually
let greet = "Good";
let timeOfDay = "Morning";
let politeGreeting = greet + " " + timeOfDay + "!"; // We add " " for a space
console.log(politeGreeting); // Output: Good Morning!

// Combining strings with numbers (JavaScript is smart!)
let productName = "Laptop";
let productPrice = 1200;
let productInfo = "The " + productName + " costs $" + productPrice + ".";
console.log(productInfo); // Output: The Laptop costs $1200.
// JavaScript automatically turns the number into a string here.
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;B. Using Template Literals (The Cool New Way with Backticks )&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a more modern and often cleaner way to concatenate strings, especially when you have variables mixed in. Template literals use backticks  instead of single or double quotes, and they let you put variables directly inside your string using &lt;code&gt;${variableName}&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy Variable Inclusion: You don't need &lt;code&gt;+&lt;/code&gt; signs to join variables!&lt;/li&gt;
&lt;li&gt;Multi-line Strings: You can write strings that span multiple lines naturally.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Using variables directly inside the string
let animal = "cat";
let sound = "meow";
let animalSays = `The ${animal} says ${sound}.`;
console.log(animalSays); // Output: The cat says meow.

// Combining with numbers (still easy!)
let item = "book";
let pages = 350;
let bookDescription = `This ${item} has ${pages} pages.`;
console.log(bookDescription); // Output: This book has 350 pages.

// Creating multi-line messages without special symbols
let poem = `Roses are red,
Violets are blue,
JavaScript is fun,
And so are you!`;
console.log(poem);
/*
Output:
Roses are red,
Violets are blue,
JavaScript is fun,
And so are you!
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why Template Literals are Great:&lt;/strong&gt;&lt;br&gt;
They make your code much easier to read, especially when you're building complex messages or even parts of web pages. You don't have to constantly open and close quotes or add &lt;code&gt;+&lt;/code&gt; signs.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>100 Days of JavaScript🔥– Day 1️⃣:Understanding Data Types &amp; Variables</title>
      <dc:creator>ANSI KADEEJA </dc:creator>
      <pubDate>Fri, 30 May 2025 03:12:54 +0000</pubDate>
      <link>https://dev.to/ansishahid/100-days-of-javascript-day-1understanding-data-types-variables-4093</link>
      <guid>https://dev.to/ansishahid/100-days-of-javascript-day-1understanding-data-types-variables-4093</guid>
      <description>&lt;p&gt;For Day 1, we're diving straight into what I consider the absolute core concepts of JavaScript:  Variables(like a box to hold information)and Data Types (what kind of information is in the box, e.g., text or numbers) .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How We Declare Variables in JavaScript:&lt;/strong&gt;&lt;br&gt;
In modern JavaScript, we primarily use two keywords to create these containers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;let&lt;/code&gt;: Use &lt;code&gt;let&lt;/code&gt; when you expect the value stored in your variable to change (or be reassigned) later in your program.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let firstNumber = 1000; // 'firstNumber ' holds the number 1000
console.log(firstNumber ); // Output: 1000

firstNumber  = 1200;     // We can change its value later!
console.log(firstNumber ); // Output: 1200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;const&lt;/code&gt;: Use &lt;code&gt;const&lt;/code&gt; when the value of the variable should never change after you've set it. If you try to reassign a const variable, JavaScript will throw an error. This is perfect for values that truly are constant, like a fixed mathematical constant or a username that shouldn't be altered.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//const example

const PIN = 3.14159; // PIN will always be this value
console.log(PIN); // Output: 3.14159

// PIN = 3.0;        // This would cause an error! (Try it in your console!)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;var&lt;/code&gt;: You might see &lt;code&gt;var&lt;/code&gt; in older code examples. While it still works, &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; were introduced in ES6 (a newer version of JavaScript) to address some confusing behaviors of &lt;code&gt;var&lt;/code&gt;. For any new code you write, it's a best practice to stick with &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Naming Our Boxes:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Just like labeling real-world boxes, there are rules for naming variables: you can use letters, numbers, underscores, and dollar signs, but they must start with a letter, &lt;code&gt;_&lt;/code&gt;, or &lt;code&gt;$&lt;/code&gt;. Also, JavaScript is case-sensitive, so &lt;code&gt;myName&lt;/code&gt; is different from &lt;code&gt;myname&lt;/code&gt;."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Storing text in a variable
const user_Name = "AnsiKadeeja";
console.log(user_Name); // Output: AnsiKadeeja

// Using a boolean
let isLoggedIn = true;
console.log(isLoggedIn); // Output: true

// Showing how 'let' allows changes
let $temperature = 20;
console.log("Current temp:", $temperature); // Output: Current temp: 20
$temperature = 22; // Changing the value
console.log("New temp:", $temperature);   // Output: New temp: 22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Frontend Cooking🍳: Building a Delicious Website</title>
      <dc:creator>ANSI KADEEJA </dc:creator>
      <pubDate>Thu, 29 May 2025 06:30:06 +0000</pubDate>
      <link>https://dev.to/ansishahid/frontend-cooking-building-a-delicious-website-124d</link>
      <guid>https://dev.to/ansishahid/frontend-cooking-building-a-delicious-website-124d</guid>
      <description>&lt;p&gt;Imagine building a website is like cooking a meal. Each part of frontend development plays a role, just like different ingredients and cooking techniques.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;HTML: The Ingredients&lt;/li&gt;
&lt;li&gt;CSS: The Cooking Style &amp;amp; Presentation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@media&lt;/code&gt; Queries: Adapting to Different "Eating Environments"&lt;/li&gt;
&lt;li&gt;JavaScript: The Chef's Actions &amp;amp; Dining Experience&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. HTML: The Ingredients (What's in the dish?)
&lt;/h2&gt;

&lt;p&gt;HTML is like your raw ingredients. It's the basic stuff that makes up your meal. Without ingredients, you have no food!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; (A big heading) is like a whole chicken – the main part of your dish.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; (A paragraph of text) is like rice – it's there to provide bulk and context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; (An image) is like vegetables – they add visual appeal and flavor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; (A clickable button) is like a condiment – something you interact with.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;div class="meal-plate"&amp;gt;
&amp;lt;h1&amp;gt;Grilled Chicken&amp;lt;/h1&amp;gt;
 &amp;lt;p&amp;gt;Served with fluffy rice and steamed broccoli.&amp;lt;/p&amp;gt;&amp;lt;img src="/brocoli.jpg" alt="A plate of grilled chicken and broccoli" width="300px" height="300px"&amp;gt;
&amp;lt;br&amp;gt;&amp;lt;button&amp;gt;Order Again&amp;lt;/button&amp;gt;
   &amp;lt;/div&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. CSS: The Cooking Style &amp;amp; Presentation (How does it look and feel?)
&lt;/h2&gt;

&lt;p&gt;CSS is how you prepare and present your ingredients. It's the cooking method, the seasoning, and how you arrange the food on the plate.&lt;br&gt;
&lt;strong&gt;A.&lt;/strong&gt; margin &lt;strong&gt;and&lt;/strong&gt; padding: &lt;strong&gt;Space on the Plate&lt;/strong&gt;&lt;br&gt;
Think of your ingredients as sitting in boxes on the plate.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;padding&lt;/code&gt; (Space inside the box): This is like adding space around the food within its own serving bowl or plate section. It ensures your chicken isn't squashed against the edges of its own little area.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   h1 {
    padding: 10px; /* 10px space inside the heading's box */
    background-color: lightgray; /* So you can see the padding */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;margin&lt;/code&gt;(Space outside the box): This is like the empty space between different serving bowls on a big platter, or the space between your plate and the edge of the table. It separates one item from another.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1 {
    margin-bottom: 20px; /* 20px space below the heading's box */
}

/* Giving each ingredient a little space from the next */
p, img, button {
    margin-bottom: 15px; /* Add space below each of these items */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;B.&lt;/strong&gt; &lt;code&gt;flex&lt;/code&gt; &lt;strong&gt;(Flexbox): Arranging Ingredients in a Row or Column&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Flexbox is like arranging your ingredients neatly in a single line or column. Imagine you have three side dishes, and you want them perfectly spaced next to each other on a long serving tray.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You'd tell the tray (.cards-section) to be a flex container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then you can tell the side dishes (.card) how to space themselves out.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="side-dishes"&amp;gt;
    &amp;lt;div class="dish"&amp;gt;Salad&amp;lt;/div&amp;gt;
    &amp;lt;div class="dish"&amp;gt;Fries&amp;lt;/div&amp;gt;
    &amp;lt;div class="dish"&amp;gt;Sauce&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
css
.side-dishes {
    display: flex; /* Make the container a flex container */
    justify-content: space-between; /* Space the items evenly across the row */
    align-items: center; /* Vertically align them in the middle */
}

.dish {
    background-color: lightyellow;
    padding: 15px;
    border: 1px solid orange;
}

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

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;C.&lt;/strong&gt;&lt;code&gt;grid&lt;/code&gt; &lt;strong&gt;(CSS Grid): Arranging a Full Plate (Rows &amp;amp; Columns)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS Grid is like setting up a whole meal on a large, sectioned plate. You decide exactly where the main course goes, where the side dishes are, and where the dessert might be, creating both rows and columns.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You tell the entire plate (&lt;code&gt;.meal-plate&lt;/code&gt;) to be a grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then you define the sections (&lt;code&gt;rows and columns&lt;/code&gt;) on your plate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, you place each ingredient (&lt;code&gt;h1, p, img, button&lt;/code&gt;) into its specific section on the grid.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="meal-plate"&amp;gt;
    &amp;lt;h1&amp;gt;Grilled Chicken&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;Served with fluffy rice and steamed broccoli.&amp;lt;/p&amp;gt;
    &amp;lt;img src="/brocoli.jpg" alt="A plate of grilled chicken and broccoli"&amp;gt;
    &amp;lt;button&amp;gt;Order Again&amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;
css
.meal-plate {
    display: grid; /* Make the plate a grid container */
    /* Define 2 columns: 1 for the text, 1 for the image */
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    /* Define rows: one for heading, one for description, one for image/button */
    grid-template-rows: auto auto 1fr auto;
    gap: 15px; /* Space between the grid sections */
    border: 2px solid brown;
    padding: 20px;
}

h1 {
    grid-column: 1 / 3; /* The heading spans across both columns */
    /* grid-area: header; (Using named areas is even more like a blueprint) */
    text-align: center;
}

p {
    grid-column: 1 / 2; /* The paragraph stays in the first column */
}

img {
    grid-column: 2 / 3; /* The image goes in the second column */
    grid-row: 2 / 4; /* The image spans rows 2 and 3 */
    max-width: 100%; /* Make sure image fits its grid cell */
    height: auto;
}

button {
    grid-column: 1 / 2; /* The button stays in the first column */
    margin-top: 10px;
}

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

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; &lt;code&gt;@media&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;Queries: Adapting to Different "Eating Environments"&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@media&lt;/code&gt; queries are like having different ways to serve your meal based on where you're eating it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Big dining table (Desktop): You can spread out your meal on a large plate, with lots of space, maybe even side dishes arranged in rows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Small coffee table (Tablet): You might need to arrange things a bit tighter, perhaps stack some side dishes if they don't fit side-by-side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eating on the go (Mobile phone): Everything needs to be compact, maybe just one item per line, very easy to see and use on a small screen.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You use &lt;code&gt;@media&lt;/code&gt; queries to tell the browser: "If the screen is smaller than X size, change the layout like this!"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; /* Default styles for desktop (large dining table) */
.meal-plate {
    /* ... (Grid settings for 2 columns, etc., as above) ... */
    width: 800px; /* Fixed width for large screens */
    margin: 20px auto;
}

/* If the screen is like a small coffee table (max-width: 768px) */
@media screen and (max-width: 768px) {
    .meal-plate {
        width: 90%; /* Make it fluid for smaller screens */
        grid-template-columns: 1fr; /* Switch to a single column layout */
        /* Now everything stacks one on top of the other */
        grid-template-rows: auto; /* Rows will adjust automatically */
    }

    h1, p, img, button {
        grid-column: 1 / 2; /* All items now span the single column */
        grid-row: auto; /* Let rows adjust naturally */
        text-align: center; /* Center text items */
    }
}

/* If the screen is like a mobile phone (max-width: 480px) */
@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.5em; /* Make the heading smaller */
        margin-bottom: 5px; /* Reduce space */
    }

    .meal-plate {
        padding: 10px; /* Less padding around the whole plate */
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;strong&gt;JavaScript: The Chef's Actions &amp;amp; Dining Experience (How does it behave and interact?)&lt;/strong&gt;&lt;br&gt;
JavaScript is the active part of your meal preparation and dining experience. It's the chef taking action, the waiter serving, or the way the food changes as you interact with it. HTML provides the ingredients, CSS makes them look good, but JavaScript makes things happen!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responding to interactions:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clicking the "Order Again" button: This is like telling the waiter "I want more chicken!" JavaScript handles this click and might show a "Order Placed!" message or even add the item to a virtual cart.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A menu expanding when you hover over it: Imagine a fancy dish cover that lifts up to reveal the meal when you get close. JavaScript can make elements appear, disappear, or change based on user actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Updating the meal dynamically:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Changing the quantity of rice: If you click a "+" button next to the rice, JavaScript can update the displayed amount without reloading the whole page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Getting daily specials from the kitchen: JavaScript can fetch new information (like today's soup special) from a "server" (the kitchen backend) and display it on your "menu" (website) without you having to ask explicitly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Adding special effects:&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-A sizzling sound effect when the steak is served: JavaScript can play sounds or create animations to enhance the user experience. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A countdown timer until the next course is ready: JavaScript can manage time-based events.&lt;/li&gt;
&lt;li&gt;Let's look at an example for our "Order Again" button:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="meal-plate-example"&amp;gt;
    &amp;lt;h1&amp;gt;Grilled Chicken&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;Served with fluffy rice and steamed broccoli. A perfect healthy meal for any time of the day!&amp;lt;/p&amp;gt;
    &amp;lt;img src="/brocoli.jpg" alt="A plate of grilled chicken and broccoli"&amp;gt;
    &amp;lt;button id="orderButtonExample"&amp;gt;Order Again&amp;lt;/button&amp;gt;
 &amp;lt;p id="messageExample" style="color: green; font-weight: bold;"&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&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;const orderButtonExample = document.getElementById('orderButtonExample');
const messageExample = document.getElementById('messageExample');

orderButtonExample.addEventListener('click', function() {
    messageExample.textContent = "Your order has been placed! Enjoy your meal!";
    orderButtonExample.disabled = true;
    orderButtonExample.style.backgroundColor = 'gray';
});


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

&lt;/div&gt;



&lt;p&gt;In this JavaScript example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;We select&lt;/strong&gt; the "Order Again" button and a new paragraph for messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;We listen&lt;/strong&gt; for a &lt;code&gt;click&lt;/code&gt; event on the button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When a click happens, a &lt;strong&gt;function&lt;/strong&gt; is executed that changes the text in the message paragraph, simulating a successful order, and disables the button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By mastering these "cooking techniques" (CSS properties), knowing when to use which "serving style" (&lt;code&gt;@media&lt;/code&gt; queries), and understanding the "chef's actions" (JavaScript), you can build delicious, dynamic, and user-friendly websites that look fantastic and are easy to use, no matter what "eating environment" (device) your users are on!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>css</category>
      <category>html</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
