<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jasna Fathim on Medium]]></title>
        <description><![CDATA[Stories by Jasna Fathim on Medium]]></description>
        <link>https://medium.com/@jasnafathim?source=rss-dac21a031fb5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FgjH6wWRFyrMkkJg</url>
            <title>Stories by Jasna Fathim on Medium</title>
            <link>https://medium.com/@jasnafathim?source=rss-dac21a031fb5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:45:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jasnafathim/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Week 1 — Part 2: JavaScript Fundamentals]]></title>
            <link>https://medium.com/@jasnafathim/week-1-part-2-javascript-fundamentals-a22cca899a09?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a22cca899a09</guid>
            <category><![CDATA[mern-stack-development]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 08:55:28 GMT</pubDate>
            <atom:updated>2026-11-13T04:52:29.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5IxzFArKtzI6ZGfb" /></figure><p>HTML gives a webpage its structure, and CSS makes it visually appealing. JavaScript allows us to add programming logic and create more complex, dynamic interactions in web pages. While HTML and CSS can provide many interactive features on their own, JavaScript greatly expands what we can do with a webpage.</p><p>JavaScript is one of the core technologies of modern web development. It allows developers to respond to user actions, update webpage content, validate forms, manipulate HTML elements, work with data, and build interactive applications.</p><h3>Understanding HTML, CSS, and JavaScript</h3><p>For example, when creating a button on a webpage:</p><ul><li><strong>HTML</strong> creates the button.</li><li><strong>CSS</strong> makes the button look attractive.</li><li><strong>JavaScript</strong> defines what happens when the user clicks it.</li></ul><p>Consider a Notes App:</p><p>When a user clicks the <strong>Add Note</strong> button, JavaScript collects the text entered by the user, stores it in an array, and dynamically displays the note on the webpage.</p><p>This is how JavaScript makes a webpage interactive.</p><h3>What We Will Learn</h3><p>In this part of Week 1, the focus is on understanding the fundamentals of JavaScript and applying them through practical examples.</p><p>We will explore variables, data types, functions, arrays, objects, loops, conditional statements, DOM manipulation, event handling, and dynamic rendering.</p><p>By the end, we will apply these concepts to build a practical Notes App and understand how user actions, data updates, and webpage rendering work together.</p><h3><strong>Variables</strong></h3><p>Variables are containers used to store data. JavaScript has three ways to declare variables: <em>let, const, var .</em></p><p><strong><em>let</em></strong></p><pre>let username = &quot;Jasna&quot;;<br>let age= 26;</pre><p>Here:</p><ul><li>let - declares a variable</li><li>username - variable name</li><li>= - assigns a value</li><li>“Jasna” - value stored in the variable</li></ul><p><strong>How to write your first JavaScript program</strong></p><ul><li>open vs code</li><li>create 2 files — index.html, script.js</li></ul><p>index.html</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;JavaScript Basic&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>script.js</p><pre>let username=&quot;Jasna&quot;;<br><br>console.log(username);</pre><ul><li>console.log() - display information in the browser console. It does not display it directly on the webpage.</li></ul><p>Now right-click index.html → Open with Live Server. To see the JavaScript output:</p><ol><li>Open the browser.</li><li>Select the Console tab</li></ol><p>You will see output as :<br>Jasna <br>26</p><pre>let username = &quot;Jasna&quot;;<br><br>username = &quot;Fathim&quot;;<br><br>console.log(username);</pre><p>Here’s what happens step by step:</p><ol><li>let username = &quot;Jasna&quot;; → The variable stores &quot;Jasna&quot;.</li><li>username = &quot;Fathim&quot;; → The old value is replaced with &quot;Fathim&quot;.</li><li>console.log(username); → Prints the current value, &quot;Fathim&quot;.</li></ol><p>So output is Fathim .</p><p>What if you want both Jasna and Fathim — use seperate variables</p><pre>let username1 = &quot;Jasna&quot;;<br>let username2 = &quot;Fathim&quot;;<br><br>console.log(username1);<br>console.log(username2);</pre><p>So output become <br>Jasna <br>Fathim</p><p><strong><em>const</em></strong></p><p>Use const when you don&#39;t want to reassign the variable.</p><pre>const country = &quot;India&quot;;<br><br>console.log(country);</pre><p>output is <strong><em>India . </em></strong>You cannot reassign it:</p><pre>const country = &quot;India&quot;;<br><br>country = &quot;USA&quot;; // Error</pre><p><strong><em>var</em></strong></p><p>var is the older way of declaring variables.</p><pre>var username = &quot;Jasna&quot;;<br><br>console.log(username);</pre><p>It is still supported, but modern JavaScript generally prefers let and const.</p><h3><strong>Data Types</strong></h3><p>Data types describe what kind of information a variable stores.</p><ul><li>String - Used to store text.</li></ul><pre>let username=&quot;Jasna:&quot;;<br>console.log(username);</pre><ul><li>Number - Used to store numeric values</li></ul><pre>let age = 25;<br>let price = 99.50;<br><br>console.log(age + 5);</pre><p>Output is 30.</p><ul><li>Boolean - Stores either true or false.</li></ul><pre>let isLoggedIn = true;<br><br>console.log(isLoggedIn);</pre><p>Output is true .</p><ul><li>Array- Stores multiple values in a single variable.</li></ul><pre>const fruits = [&quot;Apple&quot;, &quot;Mango&quot;, &quot;Orange&quot;];<br><br>console.log(fruits[0]);</pre><p>Output is Apple . Array indexing starts at 0 .</p><ul><li>Object- Stores information using key-value pairs.</li></ul><pre>const user = {<br>    name: &quot;John&quot;,<br>    age: 25,<br>    city: &quot;Kerala&quot;<br>};<br><br>console.log(user.name);</pre><p>Output: John</p><ul><li>Null- Represents an intentionally empty value.</li></ul><pre>let selectedNote = null;<br><br>console.log(selectedNote);</pre><p>Output: null</p><ul><li>Undefined- Means a variable has been declared but has not been assigned a value.</li></ul><pre>let username;<br><br>console.log(username);</pre><p>Output: undefined</p><ul><li>BigInt- Used to store very large whole numbers that are bigger than the safe range of the normal number type.</li></ul><pre>const bigNumber = 123456789012345678901234567890n;<br><br>console.log(bigNumber);</pre><p>Notice n at the end. n tells Js this is BigInt.</p><blockquote>Don’t mix BigInt and Number directly, it causes error.</blockquote><ul><li>Symbol- Special JavaScript data type used to create a unique value. Every Symbol is unique, even if you give two Symbols the same description.</li></ul><pre>const id1 = Symbol(&quot;id&quot;);<br>const id2 = Symbol(&quot;id&quot;);<br><br>console.log(id1 === id2);</pre><p>Result is false.</p><p><strong>Operators<br></strong>Operators perform operations on values.</p><ul><li>Arithmetic operators</li><li>Comparison operators</li><li>Logical operators</li></ul><p><strong>Conditional Statements<br></strong>Conditionals allow JavaScript to make decisions.</p><ul><li>if</li><li>if…else</li><li>else if</li></ul><h3><strong>Functions</strong></h3><p>A function is a reusable block of code designed to perform a particular task.</p><p>Instead of writing the same code repeatedly, we create a function and call it whenever needed.</p><p><strong>Basic function</strong></p><pre>function greet() {<br>    console.log(&quot;Hello World&quot;);<br>}<br><br>greet();</pre><p>Output: Hello World</p><ul><li><strong>Function with parameters<br></strong>Parameters allow us to pass information into a function.</li></ul><pre>function greetUser(name) {<br>    console.log(&quot;Hello &quot; + name);<br>}<br><br>greetUser(&quot;Jasna&quot;);<br>greetUser(&quot;Fathim&quot;);</pre><p>Output is:<br>Hello Jasna <br>Hello Fathim</p><ul><li><strong>Functions with return values<br></strong>return sends a result back from the function.</li></ul><pre>function add(a, b) {<br>    return a + b;<br>}<br><br>let result = add(10, 20);<br><br>console.log(result);</pre><p>Output: 30</p><ul><li><strong>Reusable logic<br></strong>Example: A reusable function for adding notes.</li></ul><pre>function addNote(note) {<br>    console.log(&quot;New note: &quot; + note);<br>}<br><br>addNote(&quot;Learn JavaScript&quot;);<br>addNote(&quot;Practice DOM&quot;);</pre><p>The same function works with different inputs.</p><h3><strong>Arrays</strong></h3><p>Arrays allow us to store multiple values in one variable.</p><pre>const notes = [<br>    &quot;Learn HTML&quot;,<br>    &quot;Learn CSS&quot;,<br>    &quot;Learn JavaScript&quot;<br>];<br><br>console.log(notes);</pre><p>Output is: Learn HTML, Learn CSS, Learn JavaScript</p><p>Access array elements</p><pre>console.log(notes[0]);<br>console.log(notes[1]);</pre><p>Output is : <br>Learn HTML<br>Learn CSS</p><ul><li><strong>push()<br></strong>Adds an element to the end of an array.</li></ul><pre>notes.push(&quot;Learn React&quot;);<br><br>console.log(notes);</pre><p>Output is like :<br>Learn HTML, Learn CSS, Learn JavaScript, Learn React</p><ul><li><strong>pop()<br></strong>Removes the last element.</li></ul><pre>notes.pop();<br><br>console.log(notes);</pre><p>Output is like :<br>Learn HTML, Learn CSS, Learn JavaScript</p><ul><li><strong>splice()<br></strong>Adds or removes elements at a specific position.</li></ul><pre>const fruits = [&quot;Apple&quot;, &quot;Mango&quot;, &quot;Orange&quot;];<br><br>fruits.splice(1, 1);<br><br>console.log(fruits);</pre><p>Output is :<br>Apple, Orange</p><p>Here: 1 is the starting index. 1 is the number of elements to remove.</p><ul><li><strong>map()<br></strong>Creates a new array by transforming each element of an existing array.</li></ul><pre>const numbers = [1, 2, 3, 4];<br><br>const doubled = numbers.map(function(number) {<br>    return number * 2;<br>});<br><br>console.log(doubled);</pre><p>Output is: 2, 4, 6, 8</p><p>Think of map() as: Take each item, perform an operation, and create a new array.</p><h3><strong>Objects</strong></h3><p>Objects store related information using key-value pairs.</p><pre>const student = {<br>    name: &quot;Jasna&quot;,<br>    age: 26,<br>    course: &quot;JavaScript&quot;<br>};<br><br>console.log(student.name);<br>console.log(student.age);</pre><p>Output is:<br>Jasna<br>26</p><blockquote><strong><em>Why we use </em></strong><strong><em>: instead of </em></strong><strong><em>= ?</em></strong><em><br></em>Inside an object, we use : to connect a property to its value.<br>We use = when assigning a value to a variable or changing a property.</blockquote><p><strong>Modify object properties<br></strong>This is about changing a property inside an object.</p><pre>let student = {<br>    name: &quot;Jasna&quot;,<br>    age: 20<br>};<br><br>console.log(student.age);</pre><p>Here, student is an object. It contains two properties: name → &quot;Rahul&quot; and age → 20 . student.age give the age property of the student object. So output gives: 20</p><ul><li><strong>Nested objects<br></strong>An object can contain another object.</li></ul><pre>const student = {<br>    name: &quot;John&quot;,<br>    address: {<br>            city: &quot;Kochi&quot;,<br>            state: &quot;Kerala&quot;<br>        }<br>    };<br>    console.log(student.address.city);</pre><p>const student = {This creates a variable called student.const means we don&#39;t plan to assign a completely new value to student. name: &quot;John&quot;, the object has a property called name. Its value is &quot;John&quot;.address: { Here we create another property called address. But instead of giving address a simple value like &quot;Kochi&quot;, we give it another object. That’s why we call this a nested object. Inside the address object, we create a property called city. Its value is &quot;Kochi&quot;. Also inside the address object, we create a property called state. Its value is &quot;Kerala&quot;. JavaScript reads it from left to right. So get the student object and the address property inside studentalso et the city property inside address. Therefore the final value is: &quot;Kochi&quot; .</p><ul><li><strong>Arrays of objects<br></strong>This is extremely important for real-world applications. Instead of storing only note text, we can store each note as an object.</li></ul><pre>const notes = [<br>    {<br>        id: 1,<br>        title: &quot;JavaScript&quot;,<br>        content: &quot;Learn variables and functions&quot;<br>    },<br>    {<br>            id: 2,<br>            title: &quot;HTML&quot;,<br>            content: &quot;Learn HTML structure&quot;<br>        }<br>    ];<br>    console.log(notes[0].title);</pre><p>Output: JavaScript</p><p><strong>Why use arrays of objects?<br></strong>Because each note can have multiple properties:</p><ul><li>ID</li><li>Title</li><li>Content</li><li>Date</li><li>Category</li></ul><p>This is how many real applications organize data.</p><h3><strong>Loops</strong></h3><p>A loop means repeat something multiple times.</p><p>For example, instead of writing:</p><pre>console.log(&quot;Hello&quot;);<br>console.log(&quot;Hello&quot;);<br>console.log(&quot;Hello&quot;);<br>console.log(&quot;Hello&quot;);<br>console.log(&quot;Hello&quot;);</pre><p>we can use a loop.</p><ul><li><strong>for loop<br></strong>The basic structure is:</li></ul><pre>for (start; condition; change) {<br>    // code to repeat<br>}</pre><p>Example:</p><pre>for (let i = 1; i &lt;= 5; i++) {<br>    console.log(i);<br>}</pre><p>Output:</p><pre>1<br>2<br>3<br>4<br>5</pre><p><strong>What is happening?</strong><br>let i = 1means start i at 1. i &lt;= 5 . Keep running while i is less than or equal to 5. i ++ increase i by 1 after each loop. So:</p><pre>i = 1 → print 1<br>i = 2 → print 2<br>i = 3 → print 3<br>i = 4 → print 4<br>i = 5 → print 5<br>i = 6 → stop</pre><ul><li><strong>for each<br></strong>forEach() is commonly used with arrays. Suppose:</li></ul><pre>const fruits = [&quot;Apple&quot;, &quot;Banana&quot;, &quot;Mango&quot;];</pre><p>We want to print every fruit. We can do:</p><pre>fruits.forEach(function(fruit) {<br>    console.log(fruit);<br>});</pre><p>Output:</p><pre>Apple<br>Banana<br>Mango</pre><p><strong>What’s happening?<br></strong>The array is:</p><pre>fruits<br>├── Apple<br>├── Banana<br>└── Mango</pre><p>forEach() goes through each item:</p><pre>Apple → run the code<br>Banana → run the code<br>Mango → run the code</pre><p>The fruit variable represents the current item.</p><p>Lets check out another example. Given:</p><pre>const students = [&quot;John&quot;, &quot;Alex&quot;, &quot;Rahul&quot;];</pre><p>Print each student using forEach().</p><p><strong>Answer</strong></p><pre>const students = [&quot;John&quot;, &quot;Alex&quot;, &quot;Rahul&quot;];<br>students.forEach(function(student) {<br>    console.log(student);<br>});</pre><p>Output:</p><pre>John<br>Alex<br>Rahul</pre><h3>DOM Manipulation</h3><p>Now we’re moving from the console to the webpage.</p><p>DOM means: Document Object Model</p><p>Basically, JavaScript can see your HTML as objects and change it.</p><p>For example:</p><pre>&lt;h1&gt;Hello&lt;/h1&gt;</pre><p>JavaScript can find that &lt;h1&gt; and change it.</p><ul><li><strong>querySelector<br></strong>querySelector() is used to find an HTML element.</li></ul><pre>&lt;h1 id=&quot;title&quot;&gt;Hello&lt;/h1&gt;</pre><pre>const title = document.querySelector(&quot;#title&quot;);</pre><p>Now title refers to that &lt;h1&gt;.</p><p><strong>Why </strong><strong>#title? </strong>Because title is an ID id=&quot;title&quot; . In CSS/JavaScript: &quot;#title&quot;means: Find the element whose ID is title.</p><ul><li><strong>innerHTML <br></strong>innerHTML lets JavaScript change the HTML inside an element.</li></ul><p>Suppose</p><pre>&lt;h1 id=&quot;title&quot;&gt;Hello&lt;/h1&gt;</pre><pre>const title = document.querySelector(&quot;#title&quot;);<br>title.innerHTML = &quot;Hello JavaScript&quot;;</pre><p>The webpage changes from: Hello to Hello JavaScript.</p><p><strong>The process</strong></p><pre>HTML<br> ↓<br>querySelector()<br> ↓<br>find &lt;h1&gt;<br> ↓<br>innerHTML<br> ↓<br>change its content</pre><ul><li><strong>createElement <br></strong>createElement() creates a new HTML element using JavaScript.</li></ul><p>For example:</p><pre>const paragraph = document.createElement(&quot;p&quot;);</pre><p>Now JavaScript has created: &quot;&lt;p&gt;&lt;/p&gt;&quot; . But it isn’t on the webpage yet. We need appendChild().</p><ul><li>appendChild<br>appendChild() adds an element inside another element.</li></ul><p>Example:</p><pre>&lt;div id=&quot;container&quot;&gt;&lt;/div&gt;</pre><pre>const paragraph = document.createElement(&quot;p&quot;);<br>paragraph.innerHTML = &quot;Hello!&quot;;<br>const container = document.querySelector(&quot;#container&quot;);<br>container.appendChild(paragraph);</pre><p>The webpage becomes:</p><pre>&lt;div id=&quot;container&quot;&gt;<br>    &lt;p&gt;Hello!&lt;/p&gt;<br>&lt;/div&gt;</pre><p>Think of it like this:</p><pre>createElement()<br>     ↓<br>Create something new<br><br>appendChild()<br>     ↓<br>Put it into the webpage</pre><p>Another eg: &lt;div id=&quot;container&quot;&gt;&lt;/div&gt;. Using JavaScript, create a &lt;p&gt; containing: Hello World and put it inside the &lt;div&gt;.</p><pre>const paragraph = document.createElement(&quot;p&quot;);<br>paragraph.innerHTML = &quot;Hello World&quot;;<br>const container = document.querySelector(&quot;#container&quot;);<br>container.appendChild(paragraph);</pre><p>First: document.createElement(&quot;p&quot;) creates: &lt;p&gt;&lt;/p&gt; . Then: paragraph.innerHTML= &quot;Hello World&quot;; makes: &lt;p&gt;Hello World&lt;/p&gt; . Then: container.appendChild(paragraph)puts it inside the container.</p><h3><strong>Events</strong></h3><p>An event is something that happens on a webpage. Examples:</p><ul><li>user clicks a button</li><li>user submits a form</li><li>user types something</li><li>mouse moves</li><li>etc.</li></ul><p>JavaScript can react to these events.</p><p><strong>Click event</strong></p><pre>&lt;button id=&quot;btn&quot;&gt;Click Me&lt;/button&gt;</pre><pre>const button = document.querySelector(&quot;#btn&quot;);<br>button.addEventListener(&quot;click&quot;, function() {<br>    console.log(&quot;Button clicked!&quot;);<br>});</pre><p>When the user clicks. Button clickedappears in the console.</p><p>Another eg: When the user clicks a button, change the heading to: Button clicked .</p><pre>&lt;h1 id=&quot;title&quot;&gt;Hello&lt;/h1&gt;</pre><pre>&lt;button id=&quot;btn&quot;&gt;Click Me&lt;/button&gt;</pre><pre>const title = document.querySelector(&quot;#title&quot;);<br>const button = document.querySelector(&quot;#btn&quot;);<br><br>button.addEventListener(&quot;click&quot;, function() {<br>    title.innerHTML = &quot;Button Clicked!&quot;;<br>});</pre><p>First: <br>- const title = document.querySelector(&quot;#title&quot;); Find the heading.<br>- Then: const button = document.querySelector(&quot;#btn&quot;); Find the button.<br>- Then: button.addEventListener(&quot;click&quot;, function() {means: “When this button is clicked, run this function.” <br>- Then: title.innerHTML = &quot;Button Clicked!&quot;;changes the heading.</p><h3><strong>Submit event</strong></h3><p>A submit event happens when a form is submitted.</p><pre>&lt;form id=&quot;myForm&quot;&gt;<br>    &lt;input id=&quot;name&quot; type=&quot;text&quot;&gt;<br>    &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;<br>&lt;/form&gt;</pre><pre>const form = document.querySelector(&quot;#myForm&quot;);<br>form.addEventListener(&quot;submit&quot;, function(event) {<br>    event.preventDefault();<br>    console.log(&quot;Form submitted!&quot;);<br>});</pre><p><strong>Why </strong><strong>event.preventDefault()?<br></strong>Normally, when a form is submitted, the browser may reload the page. We often don’t want that when we’re handling the form with JavaScript.</p><p>So: event.preventDefault(); means: <em>“Don’t do the browser’s normal submit action.”</em></p><p>Eg to try your self:- Create a form with an input. When the user submits it, print: Form submitted!</p><pre>&lt;form id=&quot;myForm&quot;&gt;<br>    &lt;input type=&quot;text&quot;&gt;<br>    &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;<br>&lt;/form&gt;</pre><pre>const form = document.querySelector(&quot;#myForm&quot;);<br>form.addEventListener(&quot;submit&quot;, function(event) {<br>    event.preventDefault();<br>    console.log(&quot;Form submitted!&quot;);<br>});</pre><h3>addEventListener</h3><p>You’ve already seen:button.addEventListener(&quot;click&quot;, function() {<br> ...<br>}); ,addEventListener() basically means: <em>“Watch for this event and do something when it happens.”</em></p><p>The pattern is:</p><pre>element.addEventListener(&quot;event&quot;, function() {<br>    // code<br>});</pre><p>For a button:</p><pre>button.addEventListener(&quot;click&quot;, function() {<br>    console.log(&quot;Clicked&quot;);<br>});</pre><p>For a form:</p><pre>form.addEventListener(&quot;submit&quot;, function() {<br>    console.log(&quot;Submitted&quot;);<br>});</pre><p>Now let’s combine everything you’ve learned. Make a small Student List.</p><pre>&lt;h1 id=&quot;title&quot;&gt;Student List&lt;/h1&gt;<br>&lt;button id=&quot;btn&quot;&gt;Add Student&lt;/button&gt;<br>&lt;div id=&quot;students&quot;&gt;&lt;/div&gt;</pre><p>When the button is clicked, JavaScript should create: John, Alex, Rahulon the webpage.</p><pre>const students = [&quot;John&quot;, &quot;Alex&quot;, &quot;Rahul&quot;];<br><br>const button = document.querySelector(&quot;#btn&quot;);<br>const container = document.querySelector(&quot;#students&quot;);<br><br>button.addEventListener(&quot;click&quot;, function() {<br><br>    students.forEach(function(student) {<br><br>        const paragraph = document.createElement(&quot;p&quot;);<br><br>        paragraph.innerHTML = student;<br><br>        container.appendChild(paragraph);<br><br>    });<br><br>});</pre><p>Let’s understand the whole thing. First:</p><pre>const students = [&quot;John&quot;, &quot;Alex&quot;, &quot;Rahul&quot;];</pre><p>We have an array.</p><pre>students<br>├── John<br>├── Alex<br>└── Rahul</pre><p>Then:</p><pre>const button = document.querySelector(&quot;#btn&quot;);</pre><p>Find the button. Then:</p><pre>const container = document.querySelector(&quot;#students&quot;);</pre><p>Find the &lt;div&gt; where we&#39;ll put the students. Then:</p><pre>button.addEventListener(&quot;click&quot;, function() {</pre><p>Wait for the button to be clicked. Then:</p><pre>students.forEach(function(student) {</pre><p>Go through every student. For each student:</p><pre>const paragraph = document.createElement(&quot;p&quot;);</pre><p>Create a new &lt;p&gt;. Then:</p><pre>paragraph.innerHTML = student;</pre><p>Put the student’s name inside it. Then:</p><pre>container.appendChild(paragraph);</pre><p>Put that &lt;p&gt; on the webpage. So the flow is:</p><pre>Click button<br>     ↓<br>addEventListener<br>     ↓<br>forEach<br>     ↓<br>createElement<br>     ↓<br>innerHTML<br>     ↓<br>appendChild<br>     ↓<br>Student appears on webpage</pre><h3>Rendering</h3><p>Rendering means: Taking your JavaScript data and displaying it on the webpage.</p><p>For example, suppose JavaScript has:</p><pre>const student = {<br>    name: &quot;John&quot;,<br>    age: 20<br>};</pre><p>This is data. But the user can’t see this object directly on the webpage. We need to take that data and put it into HTML. That’s <strong>rendering</strong>.</p><pre>JavaScript data<br>      ↓<br>   Rendering<br>      ↓<br>Webpage UI</pre><p>Simple example</p><pre>&lt;div id=&quot;student&quot;&gt;&lt;/div&gt;</pre><pre>const student = {<br>    name: &quot;John&quot;,<br>    age: 20<br>};<br>const studentDiv = document.querySelector(&quot;#student&quot;);<br>studentDiv.innerHTML = `<br>    &lt;h2&gt;${student.name}&lt;/h2&gt;<br>    &lt;p&gt;Age: ${student.age}&lt;/p&gt;<br>`;</pre><p>The JavaScript data is:</p><pre>name → John<br>age → 20</pre><p>After rendering, the webpage shows:</p><pre>John<br>Age: 20</pre><p>So:</p><pre>DATA<br> ↓<br>student object<br> ↓<br>JavaScript creates HTML<br> ↓<br>WEBPAGE</pre><p><strong>Why do we need dynamic UI?<br></strong>Imagine you have 3 students.</p><pre>const students = [<br>    &quot;John&quot;,<br>    &quot;Alex&quot;,<br>    &quot;Rahul&quot;<br>];</pre><p>You could manually write:</p><pre>&lt;p&gt;John&lt;/p&gt;<br>&lt;p&gt;Alex&lt;/p&gt;<br>&lt;p&gt;Rahul&lt;/p&gt;</pre><p>But what if you have 100 students? You don’t want to manually write 100 &lt;p&gt; elements. Instead, JavaScript can generate them.</p><pre>const students = [&quot;John&quot;, &quot;Alex&quot;, &quot;Rahul&quot;];<br>const container = document.querySelector(&quot;#students&quot;);<br>students.forEach(function(student) {<br>    container.innerHTML += `&lt;p&gt;${student}&lt;/p&gt;`;<br>});</pre><p>Now JavaScript creates the UI based on the data. That’s dynamic UI generation.</p><h3>State</h3><p>State = the current data of your application.</p><p>For example, imagine a Notes App.</p><p>Your state might be:</p><pre>const notes = [<br>    &quot;Learn JavaScript&quot;,<br>    &quot;Practice DOM&quot;<br>];</pre><p>Those notes are the current state. If the user adds another note:</p><pre>&quot;Build Notes App&quot;</pre><p>the state becomes:</p><pre>const notes = [<br>    &quot;Learn JavaScript&quot;,<br>    &quot;Practice DOM&quot;,<br>    &quot;Build Notes App&quot;<br>];</pre><p>The state changed. The most important flow, You wrote:</p><pre>User Action<br>    ↓<br>Data Update<br>    ↓<br>UI Update</pre><p>This is extremely important. Let’s understand it with a simple example. Imagine:</p><p>The user clicks the button. That’s the:</p><ol><li>User Action</li></ol><pre>User clicks &quot;Add Student&quot;</pre><p>2. Data Update<br>JavaScript changes the data:</p><pre>students.push(&quot;John&quot;);</pre><p>Now:</p><pre>students = [&quot;John&quot;];</pre><p>3. UI Update<br>JavaScript displays the updated data:</p><pre>John</pre><p>So:</p><pre>User clicks button<br>       ↓<br>Add John to array<br>       ↓<br>Render array<br>       ↓<br>John appears on webpage</pre><p><strong>Simple example<br></strong>Let’s build this step by step.</p><pre>&lt;button id=&quot;btn&quot;&gt;Add Student&lt;/button&gt;<br>&lt;div id=&quot;students&quot;&gt;&lt;/div&gt;</pre><pre>const students = [];<br>const button = document.querySelector(&quot;#btn&quot;);<br>const container = document.querySelector(&quot;#students&quot;);</pre><p>Initially:</p><pre>students = []</pre><p>Nothing is displayed. User clicks the button- We listen for the click:</p><pre>button.addEventListener(&quot;click&quot;, function() {<br>});</pre><p>Inside the function, we update our data:</p><pre>button.addEventListener(&quot;click&quot;, function() {<br>students.push(&quot;John&quot;);<br>});</pre><p>Now:</p><pre>students = [&quot;John&quot;]</pre><p>But the webpage still doesn’t automatically know what happened.</p><p>So we need to update the UI.</p><pre>button.addEventListener(&quot;click&quot;, function() {<br>students.push(&quot;John&quot;);<br>    container.innerHTML = &quot;&quot;;<br>    students.forEach(function(student) {<br>        container.innerHTML += `&lt;p&gt;${student}&lt;/p&gt;`;<br>    });<br>});</pre><p>Now the complete flow is:</p><pre>USER ACTION<br>             ↓<br>      Click &quot;Add Student&quot;<br>             ↓<br>        DATA UPDATE<br>             ↓<br>   students.push(&quot;John&quot;)<br>             ↓<br>       STATE CHANGES<br>             ↓<br>        UI UPDATE<br>             ↓<br>      Render students<br>             ↓<br>      John appears</pre><p><strong>Why do we clear the UI?<br></strong>You might notice:</p><pre>container.innerHTML = &quot;&quot;;</pre><p>This clears the old UI before rendering again. Imagine:</p><pre>students = [&quot;John&quot;]</pre><p>UI:</p><pre>John</pre><p>Then the user clicks again. We do:</p><pre>students.push(&quot;John&quot;);</pre><p>Now:</p><pre>students = [&quot;John&quot;, &quot;John&quot;]</pre><p>We clear the old UI:</p><pre>container.innerHTML = &quot;&quot;;</pre><p>Then render the current state again:</p><pre>John<br>John</pre><p>So we’re always doing:</p><pre>Current state<br>     ↓<br>Render<br>     ↓<br>Current UI</pre><p><strong>A better way to think about Rendering</strong></p><p>Instead of putting all the rendering code inside the click event, we can create a <strong>render function</strong>.</p><pre>const students = [];<br>const button = document.querySelector(&quot;#btn&quot;);<br>const container = document.querySelector(&quot;#students&quot;);<br>function render() {<br>    container.innerHTML = &quot;&quot;;<br>    students.forEach(function(student) {<br>        container.innerHTML += `&lt;p&gt;${student}&lt;/p&gt;`;<br>    });<br>}</pre><p>Now render() means: <em>“Take the current data and display it.” </em>Then:</p><pre>button.addEventListener(&quot;click&quot;, function() {<br>students.push(&quot;John&quot;);<br>    render();<br>});</pre><p>This is much cleaner.</p><p><strong>Understand </strong><strong>render() clearly</strong></p><p>Suppose:</p><pre>students = [&quot;John&quot;, &quot;Alex&quot;];</pre><p>We call:</p><pre>render();</pre><p>The function looks at the current state:</p><pre>John<br>Alex</pre><p>and creates:</p><pre>&lt;p&gt;John&lt;/p&gt;<br>&lt;p&gt;Alex&lt;/p&gt;</pre><p>on the webpage. If the state changes:</p><pre>students.push(&quot;Rahul&quot;);</pre><p>Now:</p><pre>John<br>Alex<br>Rahul</pre><p>Call:</p><pre>render();</pre><p>and the webpage becomes:</p><pre>John<br>Alex<br>Rahul</pre><p>So:</p><pre>STATE<br>  ↓<br>render()<br>  ↓<br>UI</pre><p><strong>This is the foundation of your Notes App Project</strong></p><p>Eventually your Notes App might have:</p><pre>let notes = [<br>    {<br>        id: 1,<br>        text: &quot;Learn JavaScript&quot;<br>    },<br>    {<br>        id: 2,<br>        text: &quot;Practice DOM&quot;<br>    }<br>];</pre><p>This is your state. The webpage displays those notes.</p><pre>Learn JavaScript     [Edit] [Delete]<br>Practice DOM         [Edit] [Delete]</pre><p>Now imagine the user clicks Delete.</p><p>User Action</p><pre>User clicks Delete</pre><p>Data Update</p><pre>notes = notes.filter(...);</pre><p>UI Update</p><pre>render();</pre><p>The deleted note disappears. That’s the entire idea.</p><p>Another example: counter</p><p>Let’s make this even easier.</p><pre>&lt;h1 id=&quot;count&quot;&gt;0&lt;/h1&gt;<br>&lt;button id=&quot;increase&quot;&gt;Increase&lt;/button&gt;</pre><pre>let count = 0;<br>const countElement = document.querySelector(&quot;#count&quot;);<br>const button = document.querySelector(&quot;#increase&quot;);<br>function render() {<br>    countElement.innerHTML = count;<br>}<br>button.addEventListener(&quot;click&quot;, function() {<br>    count = count + 1;<br>    render();<br>});</pre><p>First:- State: count=0, UI=0, User clicks</p><pre>Click<br> ↓<br>count = count + 1<br> ↓<br>count = 1<br> ↓<br>render()<br> ↓<br>UI shows 1</pre><p>Click again:</p><pre>Click<br> ↓<br>count = 2<br> ↓<br>render()<br> ↓<br>UI shows 2</pre><p>Again:</p><pre>Click<br> ↓<br>count = 3<br> ↓<br>render()<br> ↓<br>UI shows 3</pre><p>The key concept:- You should memorize this <strong>concept</strong>, not just the code:</p><pre>      USER ACTION<br>             ↓<br>       DATA / STATE UPDATE<br>             ↓<br>          RENDER<br>             ↓<br>        UI UPDATE</pre><p>Or even shorter:</p><pre>Action<br>  ↓<br>State<br>  ↓<br>  UI</pre><p>Another eg to create a counter.</p><pre>&lt;h1 id=&quot;count&quot;&gt;0&lt;/h1&gt;<br>&lt;button id=&quot;btn&quot;&gt;Increase&lt;/button&gt;</pre><p>When the user clicks the button:</p><pre>0 → 1 → 2 → 3 → 4 → ...</pre><p>Answer</p><pre>let count = 0;<br>const countElement = document.querySelector(&quot;#count&quot;);<br>const button = document.querySelector(&quot;#btn&quot;);<br>function render() {<br>    countElement.innerHTML = count;<br>}<br>button.addEventListener(&quot;click&quot;, function() {<br>    count = count + 1;<br>    render();<br>});</pre><p>Explanation</p><p><strong>State:</strong></p><pre>let count = 0;</pre><p><strong>User action:</strong></p><pre>button.addEventListener(&quot;click&quot;, function() {</pre><p><strong>Data update:</strong></p><pre>count = count + 1;</pre><p><strong>UI update:</strong></p><pre>render();</pre><p>One thing I want you to understand deeply</p><p>Don’t think:</p><blockquote><em>“</em><strong><em>I clicked the button, so I directly change the HTML.</em></strong><em>”</em></blockquote><p>Instead, start thinking:</p><blockquote><strong><em>“The user did something → my data changed → now I render the new data.”</em></strong></blockquote><p>That’s <strong>state thinking</strong>.</p><p>And this is the exact mental model you’ll use when we build your <strong>Notes App with add, edit, delete, search, character counter, and localStorage</strong>.</p><p>Week 1 Part 2 — Completed. Core cocept we covered are</p><ul><li>Variables</li><li>Functions</li><li>Arrays</li><li>Objects</li><li>Loops</li><li>DOM</li><li>Events</li><li>State</li><li>Rendering</li><li>Data Flow</li></ul><p><strong>Next: JavaScript Project</strong></p><p>We’ll move from learning individual concepts to building something real.</p><p>The project will bring together what you’ve learned and gradually introduce deeper JavaScript concepts through practice.</p><p>And yes — you can absolutely learn deeper JavaScript separately without disturbing this 8-week roadmap. Stay tuned for the <strong>JavaScript Project</strong></p><p><strong>Connect with me</strong></p><ul><li><a href="https://www.linkedin.com/in/jasnafathim/"><strong>LinkedIn</strong></a></li><li><a href="https://github.com/Jasnafathim/"><strong>GitHub</strong></a></li><li><a href="https://medium.com/@jasnafathim"><strong>Medium</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a22cca899a09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 1 — Part 1: Foundation: HTML , CSS]]></title>
            <link>https://medium.com/@jasnafathim/week-1-part-1-foundation-html-css-6574a686bba4?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6574a686bba4</guid>
            <category><![CDATA[full-stack-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[beginers]]></category>
            <category><![CDATA[mern-stack-development]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 07:44:43 GMT</pubDate>
            <atom:updated>2026-11-11T09:22:39.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i0DqzES2dhYwA5XJ" /></figure><h3>Introduction</h3><p>The first week focuses on building the foundation of frontend web development. Before moving into React or backend technologies, it is important to understand how webpages are structured, styled, and made interactive.</p><p>HTML, CSS, and JavaScript are the three core technologies behind frontend development.</p><p>This week focuses on understanding their roles, learning the fundamentals, and applying that knowledge through practical exercises and small projects.</p><p><strong>Topics to Learn:</strong></p><ul><li>HTML5 semantics, forms, accessibility</li><li>CSS layout: Flexbox, Grid, media queries, responsive</li><li>JavaScript basics: variables, types, loops, functions, conditionals</li><li>Data structures: arrays, objects</li><li>DOM manipulation, event handling, Browser DevTools</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Can you build a responsive portfolio site?</li><li>Can your JS to-do list app handle add/edit/delete and persist via localStorage?</li></ol><h3>HTML Fundamentals</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iCMSSWERH0Ah_nXt" /></figure><p><strong>Learning Goals</strong> :- Understand how web pages are structured.</p><h3><strong>How is the content organized?</strong></h3><p>HTML content is organized hierarchically and semantically using a tree-like structure (known as the Document Object Model or DOM):</p><ul><li><strong>Document Hierarchy:</strong> Everything nests inside a root &lt;html&gt; element, split into a metadata &lt;head&gt; and a visible &lt;body&gt;.</li><li><strong>Semantic Layout:</strong> Content is grouped into meaningful structural regions like &lt;header&gt;, &lt;nav&gt;, &lt;main&gt;, &lt;section&gt;, and &lt;footer&gt; rather than random containers.</li><li><strong>Content Flow:</strong> Text, images, lists, and forms are arranged sequentially or via CSS layout tools (like Flexbox) to create clear visual relationships (such as cards, rows, and grids).</li></ul><h3>Why are there different types of elements?</h3><p>HTML provides dozens of specialized tags because different types of content serve different purposes:</p><ul><li><strong>Semantics &amp; Meaning:</strong> Tags like &lt;h1&gt; tell browsers and search engines &quot;this is a major heading,&quot; while &lt;p&gt; says &quot;this is body text.&quot;</li><li><strong>Accessibility (a11y):</strong> Screen readers and assistive technologies rely on specific tags (like &lt;button&gt;, &lt;a&gt;, or &lt;form&gt;) to explain to visually impaired users what an element does and how to interact with it.</li><li><strong>Built-in Functionality:</strong> Different elements come with native browser behaviors. For example, an &lt;a&gt; tag handles navigation, an &lt;input&gt; handles user text entry, and a &lt;button&gt; triggers form submission without needing complex custom code.</li></ul><h3>What might happen if everything was just one repeated structure?</h3><p>Imagine if every single element on a website was just a generic &lt;div&gt; or &lt;p&gt; tag with no semantic distinction. Several major problems would occur:</p><ul><li><strong>Total Loss of Accessibility:</strong> Screen readers would treat a page title the exact same way as a footnote or a paragraph, making the website impossible to navigate for blind or visually impaired users.</li><li><strong>Poor Search Engine Optimization (SEO):</strong> Search engines like Google wouldn’t know which text is an important heading (&lt;h1&gt;) versus regular body copy, severely hurting your search ranking.</li><li><strong>Broken Native Behavior:</strong> You would lose built-in interactive features. Clicking text wouldn’t act like a link, form inputs wouldn’t accept typing natively, and buttons wouldn’t submit data unless you manually wrote complex JavaScript for every single action.</li><li><strong>Unmaintainable Code:</strong> Code would become muddy, difficult to read, and immensely hard to style or debug because developers couldn’t target specific elements based on their semantic purpose.</li></ul><h3>Website</h3><p>A website is a collection of web pages that you can access through the internet using a browser.</p><p>For example:</p><ul><li>Google → search website</li><li>YouTube → video website</li><li>Amazon → shopping website</li></ul><p>A website is commonly built using:</p><ol><li><strong>HTML — </strong>Structure/content</li><li><strong>CSS — </strong>Design/appearance</li><li><strong>JavaScript — </strong>Behaviour/interactivity</li></ol><p>Think of a website like a house:</p><ul><li>HTML = walls, rooms, doors</li><li>CSS = paint, furniture, decoration</li><li>JavaScript = electricity, switches, automatic doors</li></ul><p><strong>What Makes Up a Website<br></strong>Every website you visit (like Google, YouTube, or Amazon) has two main sides:</p><ul><li><strong>The Frontend (What you see):</strong> This is the visual part of the screen you click, read, and scroll through. It is built with three core technologies — HTML, CSS, JavaScript.</li><li><strong>The Backend (Behind the scenes):</strong> This is the hidden engine running on a computer somewhere in the world (called a <strong>server</strong>). When you log in or buy something, the backend checks your password, processes your order, and talks to the database.</li><li><strong>The Database (The memory):</strong> This is a digital filing cabinet that stores user accounts, passwords, videos, and product lists so they are saved for later.</li></ul><h3>Browser basics</h3><p>A web browser is software used to open websites.</p><p>Examples:</p><ul><li>Chrome</li><li>Firefox</li><li>Edge</li><li>Safari</li></ul><p><strong>How a Browser Works<br></strong>When you type a website name and press Enter:</p><ol><li><strong>Ask (Request)</strong> - The browser asks the internet server for the website’s files.</li><li><strong>Receive -</strong> The server sends back HTML, CSS, and JavaScript code.</li><li><strong>Display (Render)</strong> - The browser translates that code into the visual page you see on screen.</li></ol><p><strong>Note:</strong> Google Chrome is a browser, while Google (google.com) is a search<strong> engine</strong>.</p><h3>Developer Tools</h3><p>Browser Developer Tools, commonly called <strong>DevTools</strong>, are a set of built-in tools available in modern web browsers. They help developers inspect, test, debug, and understand how websites work.</p><p>When building a website, writing code is only one part of development. It is equally important to understand how that code behaves in the browser and how to identify problems when something doesn’t work as expected.</p><p>DevTools makes this process easier by allowing developers to inspect HTML, modify CSS, debug JavaScript, monitor network activity, and analyze webpage performance.</p><p>In Google Chrome, Developer Tools can be opened by Press Ctrl + Shift + I on Windows or Linux. DevTools contains several panels. Each panel has a different purpose.</p><ol><li><strong>Elements Panel<br></strong>The Elements panel allows developers to inspect and modify the HTML structure and CSS styles of a webpage. It displays the Document Object Model (DOM), which represents the webpage as a tree of elements.</li><li><strong>Console Panel<br></strong>The Console panel is used to view JavaScript messages, warnings, and errors. Developers can also execute JavaScript commands directly in the browser. It is particularly useful when debugging JavaScript code.</li><li><strong>Sources Panel<br></strong>The Sources panel allows developers to inspect the files loaded by a webpage, including JavaScript, CSS, and other resources. It also provides debugging features such as breakpoints.</li><li><strong>Network Panel<br></strong>The Network panel shows the requests made by a webpage when it loads or interacts with a server. Whenever a website requests an image, CSS file, JavaScript file, or API data, the Network panel helps developers monitor that request.</li><li><strong>Application Panel<br></strong>The Application panel helps developers inspect browser storage and other resources associated with a website.</li><li><strong>Performance Panel<br></strong>The Performance panel helps developers understand how efficiently a webpage runs. It records browser activity and helps identify performance problems.</li><li><strong>Responsive Design Mode<br></strong>DevTools also allows developers to test how a webpage looks on different screen sizes.</li></ol><p><strong>Important:</strong> Changes made directly in DevTools are temporary. They do not automatically modify your original HTML or CSS files.</p><h3>HTML document structure</h3><p>HTML stands for HyperText Markup Language. A basic HTML document looks like this:</p><ol><li><strong>html <br></strong>The &lt;html&gt; element is the <strong>root element</strong> of the webpage. All other HTML elements are placed inside it. It is also common to specify the language of the page:&lt;html lang=&quot;en&quot;&gt;</li><li><strong>head<br></strong>The &lt;head&gt; element contains information <strong>about the webpage</strong> rather than the main visible content of the page. Common elements placed inside &lt;head&gt; include:<br>&lt;title&gt; — Sets the title shown in the browser tab.<br>&lt;meta&gt; — Provides metadata about the page.<br>&lt;link&gt; — Connects external resources such as CSS files.<br>&lt;style&gt; — Contains CSS.<br>&lt;script&gt; — Can load or contain JavaScript.</li><li><strong>body<br></strong>The &lt;body&gt; element contains the main content that appears on the webpage.</li></ol><pre>HTML<br>│<br>├── HEAD<br>│   ├── Title<br>│   ├── Metadata<br>│   └── CSS / Other resources<br>│<br>└── BODY<br>    ├── Headings<br>    ├── Paragraphs<br>    ├── Images<br>    ├── Links<br>    ├── Lists<br>    ├── Forms<br>    └── Other visible content</pre><h3>Headings</h3><p>Headings are used to organize webpage content. HTML provides six levels, from &lt;h1&gt; to &lt;h6&gt;, with &lt;h1&gt; usually being the main heading.</p><pre>&lt;h1&gt;Heading 1 - Main Title (Largest)&lt;/h1&gt;<br>&lt;h2&gt;Heading 2 - Section Title&lt;/h2&gt;<br>&lt;h3&gt;Heading 3 - Sub-section Title&lt;/h3&gt;<br>&lt;h4&gt;Heading 4 - Smaller Heading&lt;/h4&gt;<br>&lt;h5&gt;Heading 5 - Minor Heading&lt;/h5&gt;<br>&lt;h6&gt;Heading 6 - Smallest Heading&lt;/h6&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OCGzU1_wReBEGqxqObN6tw.png" /></figure><h3>Paragraphs</h3><p>The &lt;p&gt; element is used to display blocks of text or paragraphs on a webpage.</p><ul><li><strong>Automatic Spacing:</strong> Browsers automatically add a blank line (margin) before and after every &lt;p&gt; tag so paragraphs look separate and easy to read.</li><li><strong>Ignores Extra Spaces and Enters:</strong> If you press <strong>Enter</strong> or hit the <strong>Spacebar</strong> multiple times inside your HTML code, the browser collapses all of them into a single space.</li></ul><pre>&lt;p&gt;This is a simple paragraph on a webpage.&lt;/p&gt;<br>&lt;p&gt;This is a second paragraph. Browsers automatically add space between them.&lt;/p&gt;</pre><p>Helpful Tags Used Inside Paragraphs</p><ul><li><strong>&lt;br&gt; (Line Break):</strong> Forces text onto a new line inside the same paragraph without starting a whole new paragraph.</li><li><strong>&lt;strong&gt; (Bold):</strong> Marks important text in <strong>bold</strong>.</li><li><strong>&lt;em&gt; (Italic):</strong> Marks emphasized text in <em>italics</em>.</li></ul><pre>&lt;p&gt;<br>  Learning &lt;strong&gt;HTML&lt;/strong&gt; is the first step.&lt;br&gt;<br>  Next, we will learn &lt;em&gt;CSS&lt;/em&gt; for styling.<br>&lt;/p&gt;</pre><h3>Links</h3><p>In HTML, links (also called hyperlinks) are created using the <strong>&lt;a&gt;</strong> (anchor) tag. They allow users to click and jump to another webpage, another file in your project, or a specific section on the same page.</p><p>Every link needs an <strong>href</strong> (Hypertext Reference) attribute that tells the browser where to go, and clickable text between the tags.</p><p><strong>Common Types of Links</strong></p><ul><li><strong>External Link:</strong> Connects to another website on the internet (always include <a href="https://)./">https://).</a></li></ul><pre>&lt;a href=&quot;https://google.com&quot;&gt;External Link&lt;/a&gt;</pre><ul><li><strong>Internal Link:</strong> Connects to another HTML page inside your own website folder.</li></ul><pre>&lt;a href=&quot;internal.html&quot;&gt;Internal links&lt;/a&gt;</pre><ul><li><strong>Open in a New Tab:</strong> Add target=&quot;_blank&quot; so the link opens in a new browser tab instead of leaving your site.</li></ul><pre>&lt;a href=&quot;https://amazon.in&quot; target=&quot;_blank&quot;&gt;Open in a new tab&lt;/a&gt;</pre><ul><li><strong>Email or Phone Link:</strong> Opens the user’s default email app or phone dialer.</li></ul><pre>&lt;a href=&quot;hello@example.com&quot;&gt;Send Email&lt;/a&gt;<br>&lt;a href=&quot;tel:+919876543210&quot;&gt;Call Us&lt;/a&gt;</pre><p><strong>Default Appearance:</strong> Browsers automatically display unvisited links in blue with an underline, and visited links in purple.</p><h3>Images</h3><p>The &lt;img&gt; element displays images on a webpage. It is a self-closing (void) tag, meaning it has no closing &lt;/img&gt; tag. The src attribute specifies the image location, while alt describes the image.</p><ul><li><strong>Local Image </strong>(From Your Project Folder): Save the image inside your website folder (for example, inside an images subfolder) and point src to it.</li></ul><pre>&lt;img src=&quot;C:\Users\J\Pictures\Screenshots\Screenshot 2026-11-11 101630.png&quot; alt=&quot;Screenshot&quot;&gt;</pre><ul><li><strong>Online Image (Using a Web URL):</strong> Copy an image address from the internet and paste the full URL into src.</li></ul><pre>&lt;img src=&quot;https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTfThVqfxdnMIgFHDCvB1T_TFNbEDwFuSJIB-_WqPHKlA&amp;s=10&quot; alt=&quot;alternate image&quot;&gt;</pre><ul><li><strong>Controlling Image Size: </strong>You can set the width and height attributes directly in pixels. Setting only width(or only height) keeps the image from stretching out of shape.</li></ul><pre>&lt;img src=&quot;https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTfThVqfxdnMIgFHDCvB1T_TFNbEDwFuSJIB-_WqPHKlA&amp;s=10&quot; alt=&quot;alternate image&quot; width=&quot;300&quot;&gt;</pre><ul><li><strong>Making an Image Clickable: </strong>Wrap the &lt;img&gt; tag inside an &lt;a&gt; tag to turn the picture into a link</li></ul><pre>&lt;a href=&quot;https://google.com&quot;&gt;<br>        &lt;img src=&quot;https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTfThVqfxdnMIgFHDCvB1T_TFNbEDwFuSJIB-_WqPHKlA&amp;s=10&quot; alt=&quot;Go to Google&quot; width=&quot;150&quot;&gt;<br>    &lt;/a&gt;</pre><h3>Lists</h3><p>Lists are used to group related items together cleanly. There are two main types of lists you will use on almost every website: <strong>Unordered Lists</strong> (bullet points) and <strong>Ordered Lists</strong> (numbered steps). HTML provides &lt;ul&gt; for unordered lists and &lt;ol&gt; for ordered lists. Individual items are added using the &lt;li&gt; element.</p><ul><li>Unordered List (&lt;ul&gt;) – Bullet Points<br>Use &lt;ul&gt; when the order of items does not matter (like a shopping list or navigation menu). Each item inside goes inside an <strong>&lt;li&gt;</strong> (List Item) tag.</li></ul><pre>&lt;ul&gt;<br>  &lt;li&gt;HTML&lt;/li&gt;<br>  &lt;li&gt;CSS&lt;/li&gt;<br>  &lt;li&gt;JavaScript&lt;/li&gt;<br>&lt;/ul&gt;</pre><ul><li>Ordered List (&lt;ol&gt;) – Numbered Steps<br>Use &lt;ol&gt; when the sequence matters (like a recipe, tutorial steps, or rankings). The browser automatically numbers each &lt;li&gt; item for you.</li></ul><pre>&lt;ol&gt;<br>  &lt;li&gt;Create index.html&lt;/li&gt;<br>  &lt;li&gt;Write your HTML code&lt;/li&gt;<br>  &lt;li&gt;Open with Live Server&lt;/li&gt;<br>&lt;/ol&gt;</pre><ul><li>Nested Lists (A List Inside a List)<br>You can place one list inside another &lt;li&gt; to create sub-points:</li></ul><pre>&lt;ul&gt;<br>  &lt;li&gt;Frontend<br>    &lt;ul&gt;<br>      &lt;li&gt;HTML&lt;/li&gt;<br>      &lt;li&gt;CSS&lt;/li&gt;<br>      &lt;li&gt;React&lt;/li&gt;<br>    &lt;/ul&gt;<br>  &lt;/li&gt;<br>  &lt;li&gt;Backend<br>    &lt;ul&gt;<br>      &lt;li&gt;Node.js&lt;/li&gt;<br>      &lt;li&gt;Express.js&lt;/li&gt;<br>    &lt;/ul&gt;<br>  &lt;/li&gt;<br>&lt;/ul&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*-t7OVpkNKDSJ1AF1QGYlZA.png" /></figure><h3>Tables</h3><p>Tables display structured data in rows and columns. The main elements are</p><ul><li>&lt;tr&gt; -<strong> </strong>Table Row: Creates a single horizontal row.</li><li>&lt;th&gt; - Table Header: Creates a bold, centered header cell (used in the top row).</li><li>&lt;td&gt; - Table Data: Creates a standard cell containing your data.</li></ul><pre>&lt;table border=&quot;1&quot;&gt;<br>  &lt;tr&gt;<br>    &lt;th&gt;Letter&lt;/th&gt;<br>    &lt;th&gt;Technology&lt;/th&gt;<br>    &lt;th&gt;Role&lt;/th&gt;<br>  &lt;/tr&gt;<br>  &lt;tr&gt;<br>    &lt;td&gt;M&lt;/td&gt;<br>    &lt;td&gt;MongoDB&lt;/td&gt;<br>    &lt;td&gt;Database&lt;/td&gt;<br>  &lt;/tr&gt;<br>  &lt;tr&gt;<br>    &lt;td&gt;E&lt;/td&gt;<br>    &lt;td&gt;Express.js&lt;/td&gt;<br>    &lt;td&gt;Backend Framework&lt;/td&gt;<br>  &lt;/tr&gt;<br>&lt;/table&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*G5Xv2StqoMj1AEv2HE86Pw.png" /></figure><p>For larger or cleaner tables, group your rows into three sections so browsers and screen readers understand the structure:</p><ul><li><strong>&lt;thead&gt;:</strong> Wraps the header row(s).</li><li><strong>&lt;tbody&gt;:</strong> Wraps the main data rows.</li><li><strong>&lt;tfoot&gt;:</strong> Wraps the summary or total row at the bottom.</li></ul><pre>&lt;table border=&quot;1&quot;&gt;<br>  &lt;thead&gt;<br>    &lt;tr&gt;<br>      &lt;th&gt;Course&lt;/th&gt;<br>      &lt;th&gt;Duration&lt;/th&gt;<br>    &lt;/tr&gt;<br>  &lt;/thead&gt;<br>  &lt;tbody&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;HTML &amp; CSS&lt;/td&gt;<br>      &lt;td&gt;2 Weeks&lt;/td&gt;<br>    &lt;/tr&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;React &amp; Node&lt;/td&gt;<br>      &lt;td&gt;6 Weeks&lt;/td&gt;<br>    &lt;/tr&gt;<br>  &lt;/tbody&gt;<br>  &lt;tfoot&gt;<br>    &lt;tr&gt;<br>      &lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;<br>      &lt;td&gt;&lt;strong&gt;8 Weeks&lt;/strong&gt;&lt;/td&gt;<br>    &lt;/tr&gt;<br>  &lt;/tfoot&gt;<br>&lt;/table&gt;</pre><p>Merging Cells (colspan and rowspan)</p><ul><li><strong>colspan=&quot;2&quot;:</strong> Makes a single cell stretch across <strong>2 columns</strong> horizontally.</li><li><strong>rowspan=&quot;2&quot;:</strong> Makes a single cell stretch across <strong>2 rows</strong> vertically.</li></ul><pre>&lt;table border=&quot;1&quot;&gt;<br>  &lt;tr&gt;<br>    &lt;th colspan=&quot;2&quot;&gt;Full Stack Developer&lt;/th&gt;<br>  &lt;/tr&gt;<br>  &lt;tr&gt;<br>    &lt;td&gt;Frontend&lt;/td&gt;<br>    &lt;td&gt;Backend&lt;/td&gt;<br>  &lt;/tr&gt;<br>&lt;/table&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*KYNluuIqkD1WLTE4Ko898w.png" /></figure><h3>Forms</h3><p>The &lt;form&gt; element is used to collect information from users, such as login details, contact information, or feedback and send that data to a server.</p><ul><li><strong>&lt;form&gt;:</strong> The main container that wraps all your input fields and buttons.</li><li><strong>&lt;input&gt;:</strong> A self-closing tag that changes its behavior based on its type attribute (text, password, email, checkbox, etc.).</li><li><strong>&lt;textarea&gt;:</strong> A multi-line text box used for longer messages or comments.</li><li><strong>&lt;select&gt; &amp; </strong><strong>&lt;option&gt;:</strong> Creates a dropdown menu of choices.</li><li><strong>&lt;button&gt;:</strong> Creates a clickable button to submit the form.</li></ul><h3>Inputs</h3><p>The &lt;input&gt; element allows users to enter different types of data, such as text, email, passwords, numbers, dates, and selections.</p><h3>Buttons</h3><p>The &lt;button&gt; element creates a clickable button, commonly used to submit forms or trigger actions with JavaScript.</p><pre>&lt;form&gt;<br>  &lt;!-- Text Input --&gt;<br>  &lt;label for=&quot;username&quot;&gt;Full Name:&lt;/label&gt;&lt;br&gt;<br>  &lt;input type=&quot;text&quot; id=&quot;username&quot; name=&quot;username&quot; placeholder=&quot;Enter your name&quot; required&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Email Input --&gt;<br>  &lt;label for=&quot;email&quot;&gt;Email:&lt;/label&gt;<br>  &lt;input type=&quot;email&quot; id=&quot;email&quot; name=&quot;email&quot; placeholder=&quot;you@example.com&quot; required&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Password Input (hides typed characters) --&gt;<br>  &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;<br>  &lt;input type=&quot;password&quot; id=&quot;password&quot; name=&quot;password&quot; required&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Radio Buttons (Pick ONE option) --&gt;<br>  &lt;p&gt;Choose your track:&lt;/p&gt;<br>  &lt;input type=&quot;radio&quot; id=&quot;frontend&quot; name=&quot;track&quot; value=&quot;frontend&quot;&gt;<br>  &lt;label for=&quot;frontend&quot;&gt;Frontend&lt;/label&gt;&lt;br&gt;<br>  &lt;input type=&quot;radio&quot; id=&quot;fullstack&quot; name=&quot;track&quot; value=&quot;fullstack&quot;&gt;<br>  &lt;label for=&quot;fullstack&quot;&gt;MERN Full Stack&lt;/label&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Dropdown Menu --&gt;<br>  &lt;label for=&quot;city&quot;&gt;City:&lt;/label&gt;&lt;br&gt;<br>  &lt;select id=&quot;city&quot; name=&quot;city&quot;&gt;<br>    &lt;option value=&quot;kochi&quot;&gt;Kochi&lt;/option&gt;<br>    &lt;option value=&quot;bengaluru&quot;&gt;Bengaluru&lt;/option&gt;<br>    &lt;option value=&quot;chennai&quot;&gt;Chennai&lt;/option&gt;<br>  &lt;/select&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Checkbox (Tick on/off) --&gt;<br>  &lt;input type=&quot;checkbox&quot; id=&quot;terms&quot; name=&quot;terms&quot; required&gt;<br>  &lt;label for=&quot;terms&quot;&gt;I agree to the terms and conditions&lt;/label&gt;&lt;br&gt;&lt;br&gt;<br><br>  &lt;!-- Submit Button --&gt;<br>  &lt;button type=&quot;submit&quot;&gt;Create Account&lt;/button&gt;<br>&lt;/form&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*FN0s2sJlBBvtZG4MbiOS3Q.png" /></figure><p><strong>Putting Everything Together</strong></p><p>The following example combines these HTML elements into a simple personal profile page:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br><br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;My Profile&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>    &lt;!-- Heading --&gt;<br>    &lt;h1&gt;John Doe&lt;/h1&gt;<br><br>    &lt;!-- Paragraph --&gt;<br>    &lt;p&gt;<br>        I&#39;m learning web development and building my first portfolio.<br>    &lt;/p&gt;<br><br>    &lt;!-- Image --&gt;<br>    &lt;img src=&quot;profile.jpg&quot; alt=&quot;Profile picture&quot; width=&quot;150&quot;&gt;<br><br>    &lt;!-- Link --&gt;<br>    &lt;p&gt;<br>        &lt;a href=&quot;https://github.com&quot;&gt;Visit my GitHub&lt;/a&gt;<br>    &lt;/p&gt;<br><br>    &lt;!-- List --&gt;<br>    &lt;h2&gt;My Skills&lt;/h2&gt;<br><br>    &lt;ul&gt;<br>        &lt;li&gt;HTML&lt;/li&gt;<br>        &lt;li&gt;CSS&lt;/li&gt;<br>        &lt;li&gt;JavaScript&lt;/li&gt;<br>    &lt;/ul&gt;<br><br>    &lt;!-- Table --&gt;<br>    &lt;h2&gt;Projects&lt;/h2&gt;<br><br>    &lt;table border=&quot;1&quot;&gt;<br>        &lt;tr&gt;<br>            &lt;th&gt;Project&lt;/th&gt;<br>            &lt;th&gt;Technology&lt;/th&gt;<br>        &lt;/tr&gt;<br><br>        &lt;tr&gt;<br>            &lt;td&gt;Portfolio&lt;/td&gt;<br>            &lt;td&gt;HTML&lt;/td&gt;<br>        &lt;/tr&gt;<br><br>        &lt;tr&gt;<br>            &lt;td&gt;To-Do App&lt;/td&gt;<br>            &lt;td&gt;JavaScript&lt;/td&gt;<br>        &lt;/tr&gt;<br>    &lt;/table&gt;<br><br>    &lt;!-- Form --&gt;<br>    &lt;h2&gt;Contact Me&lt;/h2&gt;<br><br>    &lt;form&gt;<br>        &lt;label for=&quot;name&quot;&gt;Name:&lt;/label&gt;<br>        &lt;input type=&quot;text&quot; id=&quot;name&quot; placeholder=&quot;Enter your name&quot;&gt;<br><br>        &lt;br&gt;&lt;br&gt;<br><br>        &lt;label for=&quot;email&quot;&gt;Email:&lt;/label&gt;<br>        &lt;input type=&quot;email&quot; id=&quot;email&quot; placeholder=&quot;Enter your email&quot;&gt;<br><br>        &lt;br&gt;&lt;br&gt;<br><br>        &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;<br>    &lt;/form&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*InbOL3IwClMS5rAgkIKRdw.png" /></figure><h3>Project</h3><p>Build a personal profile page containing:</p><ul><li>Name</li><li>Biography</li><li>Image</li><li>Social links</li></ul><p><strong>Contact form Concepts to Understand</strong></p><ul><li>HTML provides structure.</li><li>HTML is semantic.</li><li>Forms collect user input.</li></ul><h3>CSS Fundamentals</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VXPNf_6MaT8Edy8b" /></figure><p><strong>Learning Goals</strong>:- Learn how presentation is separated from structure.</p><h3>How Does the Same Content Appear Differently Across Websites?</h3><p>Even if two websites use the exact same raw HTML text or structure, they can look completely different because of <strong>CSS (Cascading Style Sheets)</strong>.</p><ul><li><strong>Custom Styling:</strong> CSS acts as the clothing and makeup for your HTML skeleton. Developers can apply entirely different color schemes, typography, spacing rules, and layout structures to the same text.</li><li><strong>Browser Defaults:</strong> Every browser (Chrome, Safari, Firefox) has its own built-in default styling for elements (like margins on paragraphs or default blue underlined links), which developers often override using CSS “resets” to create a consistent look.</li></ul><h3>2. What Controls Spacing, Colors, and Positioning?</h3><p>Specific CSS properties handle each of these visual aspects:</p><ul><li><strong>Spacing:</strong> Controlled by the <strong>CSS Box Model</strong>, which includes <strong>padding</strong> (space inside an element’s border), <strong>margin</strong> (space outside an element’s border), and properties like gap in Flexbox or Grid.</li><li><strong>Colors:</strong> Controlled by properties such as color (for text), background-color, and border-color, using color values like HEX (#2563eb), RGB, or HSL.</li><li><strong>Positioning:</strong> Controlled by layout engines and properties like:</li><li><strong>Positioning types:</strong> position: relative, absolute, fixed, or sticky.</li><li><strong>Flexbox &amp; Grid:</strong> Properties like display: flex, justify-content, align-items, and CSS Grid to align items horizontally or vertically.</li></ul><h3>3. Why Do Layouts Sometimes Behave Unexpectedly?</h3><p>Web layouts can occasionally break or look strange due to a few common CSS quirks:</p><ul><li><strong>The Box Model Miscalculation:</strong> By default, adding padding and borders to an element <em>adds</em> to its total width, causing it to overflow its container. (Fixed using box-sizing: border-box).</li><li><strong>Collapsing Margins:</strong> Vertical margins between adjacent elements sometimes combine (collapse) into a single margin rather than adding together, which can throw off expected spacing.</li><li><strong>Flexbox Overflow:</strong> If flex items don’t have rules to wrap (flex-wrap: wrap) or shrink, they can overflow their parent container on smaller screens.</li><li><strong>CSS Specificity Conflicts:</strong> If two conflicting CSS rules target the same element, the more specific rule wins, which can sometimes override the styles you intended to apply.</li></ul><p><strong>Topics</strong></p><ul><li>Inline CSS <br>CSS written directly inside an HTML element using the style attribute. It is useful for quick, one-off styling.</li></ul><pre>&lt;p style=&quot;color: blue;&quot;&gt;Hello World&lt;/p&gt;</pre><ul><li>Internal CSS <br>CSS written inside a &lt;style&gt; element in the HTML document&#39;s &lt;head&gt;. It is useful when styling a single webpage.</li></ul><pre>&lt;style&gt;<br>    p {<br>        color: blue;<br>    }<br>&lt;/style&gt;</pre><ul><li>External CSS <br>CSS written in a separate .css file and linked to the HTML page. This is the preferred approach for most real-world projects.</li></ul><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;</pre><ul><li>Colors <br>CSS allows you to set colors for text, backgrounds, borders, and other elements.</li></ul><pre>h1 {<br>    color: blue;<br>    background-color: lightgray;<br>}</pre><ul><li>Fonts <br>The font-family property controls which font is used for text.</li></ul><pre>body {<br>    font-family: Arial, sans-serif;<br>}</pre><ul><li>Typography <br>Typography controls how text looks, including size, weight, spacing, and line height.</li></ul><pre>p {<br>    font-size: 16px;<br>    line-height: 1.5;<br>    font-weight: 400;<br>}</pre><ul><li>Text alignment<br>The text-align property controls the horizontal alignment of text. Common values include left, center, right, and justify.</li></ul><pre>h1 {<br>    text-align: center;<br>}</pre><ul><li>Box Model<br>Every HTML element is treated as a box consisting of content, padding, border, and margin.</li></ul><pre>.card {<br>    padding: 20px;<br>    border: 1px solid black;<br>    margin: 10px;<br>}</pre><ul><li>Margin<br>Margin creates space <strong>outside</strong> an element’s border. It is commonly used to separate elements from each other.</li></ul><pre>.card {<br>    margin: 20px;<br>}</pre><ul><li>Padding<br>Padding creates space <strong>inside</strong> an element, between its content and border.</li></ul><pre>.card {<br>    padding: 20px;<br>}</pre><ul><li>Borders<br>The border property adds a visible boundary around an element.</li></ul><pre>.card {<br>    border: 1px solid #333;<br>}</pre><ul><li>Flexbox<br>Flexbox is a CSS layout system used to arrange elements in a row or column and control their alignment and spacing.</li></ul><pre>.container {<br>    display: flex;<br>    justify-content: center;<br>    gap: 20px;<br>}</pre><p>For example, Flexbox can be used to create navigation bars, card layouts, and horizontally aligned sections.</p><p><strong>CSS Units</strong></p><ul><li>px — Fixed pixel unit. eg: width: 300px;</li><li>rem — Relative to the root (html) font size. eg: padding: 2rem;</li><li>% — Relative to the parent element. eg: width: 100%; means the element takes 100% of the available parent width.</li></ul><h3>Project</h3><p>Improve the profile page by adding:</p><ul><li>Navigation bar</li><li>Card layout</li><li>Better spacing</li><li>Responsive Flexbox layout</li></ul><p><strong>Concepts to Understand:</strong></p><ul><li>HTML = structure</li><li>CSS = presentation</li></ul><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot;&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>  &lt;title&gt;Personal Profile&lt;/title&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>  &lt;div class=&quot;container&quot;&gt;   <br>    &lt;section class=&quot;card profile-header&quot; id=&quot;about&quot;&gt;<br>      &lt;img src=&quot;#&quot; alt=&quot;profile pic&quot; class=&quot;avatar&quot;&gt;<br>      &lt;div class=&quot;profile-info&quot;&gt;<br>        &lt;h1 class=&quot;name&quot;&gt;Jasna Fathim&lt;/h1&gt;<br>        &lt;p class=&quot;title&quot;&gt;MERN Stack Developer Trainee&lt;/p&gt;<br><br>        &lt;div class=&quot;contactdetails&quot;&gt;<br>          &lt;div class=&quot;d-item&quot;&gt;jasnafathim@gmail.com&lt;/div&gt;<br>          &lt;div class=&quot;d-item&quot;&gt;+91 9999999999&lt;/div&gt;<br>          &lt;div class=&quot;d-item&quot;&gt;Alappuzha&lt;/div&gt;<br>        &lt;/div&gt;<br><br>        &lt;p class=&quot;bio&quot;&gt;Motivated and detail oriented MCA graduate seeking mern stack entry level position to apply technical knowledge and upskilling in a real world environment. Eager to contribute to a dynamic team, embrace new technologies, and grow professionally within the industry&lt;/p&gt;<br>        &lt;div class=&quot;social-links&quot;&gt;<br>          &lt;a href=&quot;https://www.linkedin.com/in/jasnafathim/&quot; target=&quot;_blank&quot;  class=&quot;social-btn&quot;&gt;LinkedIn&lt;/a&gt;<br>          &lt;a href=&quot;https://github.com/Jasnafathim&quot; target=&quot;_blank&quot; class=&quot;social-btn&quot;&gt;GitHub&lt;/a&gt;<br>          &lt;a href=&quot;https://medium.com/@jasnafathim&quot; target=&quot;_blank&quot; class=&quot;social-btn&quot;&gt;Medium&lt;/a&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/section&gt;<br>    &lt;section class=&quot;card&quot; id=&quot;contact&quot;&gt;<br>  &lt;h2 class=&quot;section-title&quot;&gt;Get in Touch&lt;/h2&gt;<br><br>  &lt;form action=&quot;#&quot; method=&quot;POST&quot;&gt;<br>    &lt;div class=&quot;form-group&quot;&gt;<br>      &lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;<br>      &lt;input<br>        type=&quot;text&quot;<br>        id=&quot;name&quot;<br>        name=&quot;name&quot;<br>        placeholder=&quot;Your name&quot;<br>        required<br>      &gt;<br>    &lt;/div&gt;<br><br>    &lt;div class=&quot;form-group&quot;&gt;<br>      &lt;label for=&quot;email&quot;&gt;Email&lt;/label&gt;<br>      &lt;input<br>        type=&quot;email&quot;<br>        id=&quot;email&quot;<br>        name=&quot;email&quot;<br>        placeholder=&quot;your.email@example.com&quot;<br>        required<br>      &gt;<br>    &lt;/div&gt;<br><br>    &lt;div class=&quot;form-group&quot;&gt;<br>      &lt;label for=&quot;message&quot;&gt;Message&lt;/label&gt;<br>      &lt;textarea<br>        id=&quot;message&quot;<br>        name=&quot;message&quot;<br>        placeholder=&quot;What&#39;s on your mind?&quot;<br>        required<br>      &gt;&lt;/textarea&gt;<br>    &lt;/div&gt;<br><br>    &lt;button type=&quot;submit&quot; class=&quot;submit-btn&quot;&gt;<br>      Send Message<br>    &lt;/button&gt;<br>  &lt;/form&gt;<br>&lt;/section&gt;    <br>  &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Below is a line-by-line explanation in simple terms.</p><h3>HTML Explanation</h3><pre>&lt;!DOCTYPE html&gt;</pre><p>Tells the browser that this document uses <strong>HTML5</strong>.</p><pre>&lt;html lang=&quot;en&quot;&gt;</pre><p>The root element of the webpage. lang=&quot;en&quot; tells browsers and screen readers that the page is written in English.</p><pre>&lt;head&gt;</pre><p>Contains information about the webpage that is not directly displayed as page content.</p><pre>&lt;meta charset=&quot;UTF-8&quot;&gt;</pre><p>Sets the character encoding to UTF-8 so the page can correctly display letters, symbols, and special characters.</p><pre>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;</pre><p>Makes the webpage responsive on mobile devices. width=device-width makes the page width match the device width.</p><pre>&lt;title&gt;Personal Profile&lt;/title&gt;</pre><p>Sets the title displayed in the browser tab.</p><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;</pre><p>Connects the HTML file to the external CSS file named style.css.</p><h3>Body</h3><pre>&lt;body&gt;</pre><p>Contains everything that is visible on the webpage.</p><pre>&lt;div class=&quot;container&quot;&gt;</pre><p>Creates a container around the profile. The container class is later styled using CSS.</p><pre>&lt;section class=&quot;card profile-header&quot; id=&quot;about&quot;&gt;</pre><p>Creates a semantic section for the profile.</p><p>It has two CSS classes:</p><ul><li>card → provides the card design</li><li>profile-header → controls the profile layout</li></ul><p>id=&quot;about&quot; gives this section a unique identifier that can be used for links or JavaScript.</p><h3>Profile Image</h3><pre>&lt;img src=&quot;#&quot;<br>     alt=&quot;profile pic&quot;<br>     class=&quot;avatar&quot;&gt;</pre><p>Displays the profile image.</p><ul><li>src → location of the image</li><li>alt → alternative text if the image cannot load and helps screen readers</li><li>class=&quot;avatar&quot; → applies the CSS styling for the image</li></ul><p>A local Windows path usually works only on your own computer. For a website, it is better to keep the image inside your project folder:</p><pre>project/<br>├── index.html<br>├── style.css<br>└── Image.png</pre><p>Then use:</p><pre>&lt;img src=&quot;Image.png&quot; alt=&quot;Profile picture&quot; class=&quot;avatar&quot;&gt;</pre><h3>Profile Information</h3><pre>&lt;div class=&quot;profile-info&quot;&gt;</pre><p>Groups all the text and links related to the profile.</p><pre>&lt;h1 class=&quot;name&quot;&gt;Jasna Fathim&lt;/h1&gt;</pre><p>The main heading of the page. The name class is used to style it.</p><pre>&lt;p class=&quot;title&quot;&gt;MERN Stack Developer Trainee&lt;/p&gt;</pre><p>Displays the person’s professional title.</p><pre>&lt;div class=&quot;contactdetails&quot;&gt;</pre><p>Groups the contact information together.</p><pre>&lt;div class=&quot;d-item&quot;&gt;jasna@gmail.com&lt;/div&gt;<br>&lt;div class=&quot;d-item&quot;&gt;+91 9999999999&lt;/div&gt;<br>&lt;div class=&quot;d-item&quot;&gt;Alappuzha&lt;/div&gt;</pre><p>Each &lt;div&gt; represents one contact detail. The d-item class gives all three items common styling.</p><h3>Bio</h3><pre>&lt;p class=&quot;bio&quot;&gt;</pre><p>Creates a paragraph containing the profile description. The bio class controls its font size, color, and spacing.</p><h3>Social Links</h3><pre>&lt;div class=&quot;social-links&quot;&gt;</pre><p>Groups the social media links.</p><pre>&lt;a href=&quot;https://www.linkedin.com/in/jasnafathim/&quot; target=&quot;_blank&quot; class=&quot;social-btn&quot;&gt;<br>    LinkedIn<br>&lt;/a&gt;</pre><p>Creates a clickable link.</p><ul><li>href → destination URL</li><li>target=&quot;_blank&quot; → opens the link in a new browser tab</li><li>class=&quot;social-btn&quot; → applies button-like styling</li></ul><p>The same structure is used for GitHub and Medium.</p><pre>&lt;section class=&quot;card&quot; id=&quot;contact&quot;&gt;</pre><p>Creates a section for the contact form. The class is used for CSS styling, while id=&quot;contact&quot; gives the section a unique identifier.</p><pre>&lt;h2 class=&quot;section-title&quot;&gt;Get in Touch&lt;/h2&gt;</pre><p>Creates the heading <strong>“Get in Touch”</strong> for the contact section.</p><pre>&lt;form action=&quot;#&quot; method=&quot;POST&quot;&gt;</pre><p>Creates the form. action specifies where the form data should be sent, while method=&quot;POST&quot; specifies how the data should be submitted.</p><pre>&lt;div class=&quot;form-group&quot;&gt;</pre><p>Groups a label and its input together so they can be styled as one form field.</p><pre>&lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;</pre><p>Creates a label for the name field. The for value connects the label to the input with the matching id.</p><pre>&lt;input<br>  type=&quot;text&quot;<br>  id=&quot;name&quot;<br>  name=&quot;name&quot;<br>  placeholder=&quot;Your name&quot;<br>  required<br>&gt;</pre><p>Creates a text input field.</p><ul><li>type=&quot;text&quot; — Allows the user to enter text.</li><li>id=&quot;name&quot; — Gives the input a unique identifier.</li><li>name=&quot;name&quot; — Identifies the field when form data is submitted.</li><li>placeholder=&quot;Your name&quot; — Displays temporary hint text.</li><li>required — Prevents submission if the field is empty.</li></ul><h3>Email Field</h3><pre>&lt;label for=&quot;email&quot;&gt;Email&lt;/label&gt;</pre><p>Creates a label for the email input.</p><pre>&lt;input<br>  type=&quot;email&quot;<br>  id=&quot;email&quot;<br>  name=&quot;email&quot;<br>  placeholder=&quot;your.email@example.com&quot;<br>  required<br>&gt;</pre><p>Creates an email input.</p><ul><li>type=&quot;email&quot; — Tells the browser that an email address is expected.</li><li>id — Identifies the element.</li><li>name — Identifies the field when submitting the form.</li><li>placeholder — Shows an example email format.</li><li>required — Makes the field mandatory.</li></ul><h3>Message Field</h3><pre>&lt;label for=&quot;message&quot;&gt;Message&lt;/label&gt;</pre><p>Creates a label for the message field.</p><pre>&lt;textarea<br>  id=&quot;message&quot;<br>  name=&quot;message&quot;<br>  placeholder=&quot;What&#39;s on your mind?&quot;<br>  required<br>&gt;&lt;/textarea&gt;</pre><p>Creates a multi-line text area where users can write a longer message.</p><ul><li>id=&quot;message&quot; — Identifies the textarea.</li><li>name=&quot;message&quot; — Identifies the submitted value.</li><li>placeholder — Gives the user a hint.</li><li>required — Makes the field mandatory.</li></ul><h3>Submit Button</h3><pre>&lt;button type=&quot;submit&quot;&gt;Send Message&lt;/button&gt;</pre><p>Creates a button that submits the form.</p><ul><li>type=&quot;submit&quot; — Tells the browser to submit the form.</li><li>Send Message — The text displayed on the button.</li></ul><h3><strong>CSS Explanation</strong></h3><pre>*{<br>    box-sizing: border-box;<br>    margin: 0;<br>    padding: 0;<br>}<br><br>body{    <br>    color: #0f172a;<br>    line-height: 1.6;<br>}<br><br>.container {<br>    max-width: 750px;<br>    margin: 2.5rem auto;<br>    padding: 0 1rem;<br>    display: flex;<br>    flex-direction: column;<br>    gap: 2rem;<br>}<br><br>.card {<br>    background: #ffffff;<br>    border: 1px solid #e2e8f0;<br>    border-radius: 16px;<br>    padding: 2.5rem;<br>    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);<br>}<br><br>.profile-header {<br>    display: flex;<br>    align-items: center;<br>    gap: 2rem;<br>    flex-wrap: wrap;<br>}<br><br>.avatar {<br>    width: 130px;<br>    height: 130px;<br>    border-radius: 50%;<br>    object-fit: cover;   <br>    flex-shrink: 0;<br>}<br><br>.profile-info {<br>    flex: 1;<br>    min-width: 250px;<br>}<br><br>.name {<br>    font-size: 2rem;<br>    font-weight: 700;<br>    margin-bottom: 0.2rem;<br>}<br><br>.title {<br>    color: #03070e82;<br>    font-weight: 500;<br>    margin-bottom: 0.5rem;<br>}<br><br>.contactdetails {<br>    display: flex;<br>    align-items: center;<br>    gap: 1.25rem;<br>    flex-wrap: wrap;<br>    margin-bottom: 0.75rem;<br>    font-size: 0.9rem;<br>    color: #76a4e5;<br>}<br><br>.d-item {<br>    display: inline-flex;<br>    align-items: center;<br>    gap: 0.35rem;<br>    text-decoration: none;<br>}<br><br>.d-item u {    <br>    text-decoration: none;<br>}    <br><br>.bio {<br>    color: #64748b;<br>    font-size: 0.95rem;<br>    margin-bottom: 1.25rem;<br>}<br><br>.social-links {<br>    display: flex;<br>    gap: 0.75rem;<br>    flex-wrap: wrap;<br>}<br><br>.social-btn {<br>    padding: 0.4rem 0.9rem;<br>    border-radius: 20px;<br>    background-color: #f8fafc;<br>    color: #0f172a;<br>    text-decoration: none;<br>    font-size: 0.85rem;<br>    font-weight: 500;<br>    border: 1px solid #e2e8f0;<br>    transition: all 0.2s;<br>}<br><br>.social-btn:hover {<br>    background-color: #2563eb;<br>    color: #ffffff;       <br>}<br><br>.section-title {<br>  font-size: 1.3rem;<br>  font-weight: 600;<br>  margin-bottom: 1.25rem;<br>}<br><br>.form-group {<br>  margin-bottom: 1.25rem;<br>}<br><br>label {<br>  display: block;<br>  font-size: 0.875rem;<br>  font-weight: 500;<br>  margin-bottom: 0.4rem;<br>}<br><br>input,<br>textarea {<br>  width: 100%;<br>  padding: 0.75rem;<br>  border: 1px solid #e2e8f0;<br>  border-radius: 8px;<br>  font-family: inherit;<br>  font-size: 0.95rem;<br>  background-color: #f8fafc;<br>  color: #0f172a;<br>}<br><br>input:focus,<br>textarea:focus {<br>  outline: none;<br>  border-color: #2563eb;<br>  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);<br>}<br><br>textarea {<br>  resize: vertical;<br>  min-height: 120px;<br>}<br><br>.submit-btn {<br>  width: 100%;<br>  padding: 0.75rem;<br>  background-color: #2563eb;<br>  color: #ffffff;<br>  border: none;<br>  border-radius: 8px;<br>  font-size: 1rem;<br>  font-weight: 600;<br>  cursor: pointer;<br>}<br><br>.submit-btn:hover {<br>  background-color: #1d4ed8;<br>}</pre><p>1. Universal Selector</p><pre>* {<br>    box-sizing: border-box;<br>    margin: 0;<br>    padding: 0;<br>}</pre><ul><li>* → Selects all HTML elements on the page.</li><li>box-sizing: border-box; → Includes padding and border inside the element&#39;s defined width and height.</li><li>margin: 0; → Removes the default outer spacing from all elements.</li><li>padding: 0; → Removes the default inner spacing from all elements.</li></ul><h3>Body Styling</h3><pre>body {    <br>    color: #0f172a;<br>    line-height: 1.6;<br>}</pre><ul><li>body → Selects the entire visible webpage.</li><li>color: #0f172a; → Sets the default text color.</li><li>line-height: 1.6; → Increases the space between lines of text, making the content easier to read.</li></ul><h3>Container</h3><pre>.container {<br>    max-width: 750px;<br>    margin: 2.5rem auto;<br>    padding: 0 1rem;<br>    display: flex;<br>    flex-direction: column;<br>    gap: 2rem;<br>}</pre><ul><li>.container → Selects the HTML element with class=&quot;container&quot;.</li><li>max-width: 750px; → Prevents the container from becoming wider than 750 pixels.</li><li>margin: 2.5rem auto; → Adds vertical spacing and centers the container horizontally.</li><li>padding: 0 1rem; → Adds 1rem of horizontal inner spacing.</li><li>display: flex; → Makes the container a Flexbox container.</li><li>flex-direction: column; → Arranges its child elements vertically.</li><li>gap: 2rem; → Adds 2rem of space between the child elements.</li></ul><h3>Card</h3><pre>.card {<br>    background: #ffffff;<br>    border: 1px solid #e2e8f0;<br>    border-radius: 16px;<br>    padding: 2.5rem;<br>    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);<br>}</pre><ul><li>.card → Selects elements with the card class.</li><li>background: #ffffff; → Gives the card a white background.</li><li>border: 1px solid #e2e8f0; → Adds a 1-pixel border.</li><li>border-radius: 16px; → Rounds the corners of the card.</li><li>padding: 2.5rem; → Adds space inside the card.</li><li>box-shadow → Adds a subtle shadow around the card.</li></ul><p><strong>Note:</strong> You have .card defined <strong>twice</strong> in your CSS. The second definition repeats the background, border, radius, and padding. You can safely keep only one .card block.</p><h3>Profile Header</h3><pre>.profile-header {<br>    display: flex;<br>    align-items: center;<br>    gap: 2rem;<br>    flex-wrap: wrap;<br>}</pre><ul><li>display: flex; → Places the profile image and information next to each other.</li><li>align-items: center; → Vertically centers the items.</li><li>gap: 2rem; → Adds space between the image and profile information.</li><li>flex-wrap: wrap; → Allows the items to move to the next line on smaller screens.</li></ul><h3>Profile Image</h3><pre>.avatar {<br>    width: 130px;<br>    height: 130px;<br>    border-radius: 50%;<br>    object-fit: cover;   <br>    flex-shrink: 0;<br>}</pre><ul><li>.avatar → Selects the profile image.</li><li>width: 130px; → Sets the image width.</li><li>height: 130px; → Sets the image height.</li><li>border-radius: 50%; → Makes the image circular.</li><li>object-fit: cover; → Makes the image fill the area without stretching.</li><li>flex-shrink: 0; → Prevents the image from becoming smaller inside the Flexbox layout.</li></ul><h3>Profile Information</h3><pre>.profile-info {<br>    flex: 1;<br>    min-width: 250px;<br>}</pre><ul><li>flex: 1; → Allows the profile information to take up the available remaining space.</li><li>min-width: 250px; → Prevents the profile information from becoming too narrow.</li></ul><h3>Name</h3><pre>.name {<br>    font-size: 2rem;<br>    font-weight: 700;<br>    margin-bottom: 0.2rem;<br>}</pre><ul><li>font-size: 2rem; → Makes the name larger.</li><li>font-weight: 700; → Makes the name bold.</li><li>margin-bottom: 0.2rem; → Adds a small space below the name.</li></ul><h3>Job Title</h3><pre>.title {<br>    color: #03070e82;<br>    font-weight: 500;<br>    margin-bottom: 0.5rem;<br>}</pre><ul><li>color → Sets the text color of the job title.</li><li>font-weight: 500; → Gives the text medium thickness.</li><li>margin-bottom: 0.5rem; → Adds space below the title.</li></ul><h3>Contact Details</h3><pre>.contactdetails {<br>    display: flex;<br>    align-items: center;<br>    gap: 1.25rem;<br>    flex-wrap: wrap;<br>    margin-bottom: 0.75rem;<br>    font-size: 0.9rem;<br>    color: #76a4e5;<br>}</pre><ul><li>display: flex; → Places contact details in a flexible row.</li><li>align-items: center; → Vertically aligns the contact items.</li><li>gap: 1.25rem; → Adds space between contact details.</li><li>flex-wrap: wrap; → Allows them to move to another line on smaller screens.</li><li>margin-bottom: 0.75rem; → Adds space below the contact section.</li><li>font-size: 0.9rem; → Makes the contact text slightly smaller.</li><li>color → Sets the contact text color.</li></ul><h3>Contact Item</h3><pre>.d-item {<br>    display: inline-flex;<br>    align-items: center;<br>    gap: 0.35rem;<br>    text-decoration: none;<br>}</pre><ul><li>display: inline-flex; → Makes each contact item behave like an inline Flexbox element.</li><li>align-items: center; → Vertically aligns its contents.</li><li>gap: 0.35rem; → Adds a small space between child elements.</li><li>text-decoration: none; → Removes text decoration such as underlining.</li></ul><h3>Underline Element</h3><pre>.d-item u {    <br>    text-decoration: none;<br>}</pre><ul><li>.d-item u → Selects &lt;u&gt; elements inside .d-item.</li><li>text-decoration: none; → Removes the underline.</li></ul><p><strong>Note:</strong> If you are not using &lt;u&gt; inside .d-item, this CSS rule is unnecessary.</p><h3>Biography</h3><pre>.bio {<br>    color: #64748b;<br>    font-size: 0.95rem;<br>    margin-bottom: 1.25rem;<br>}</pre><ul><li>color → Sets the biography text color.</li><li>font-size: 0.95rem; → Sets a slightly smaller font size.</li><li>margin-bottom: 1.25rem; → Adds space below the biography.</li></ul><h3>Social Links Container</h3><pre>.social-links {<br>    display: flex;<br>    gap: 0.75rem;<br>    flex-wrap: wrap;<br>}</pre><ul><li>display: flex; → Places social buttons in a row.</li><li>gap: 0.75rem; → Adds space between buttons.</li><li>flex-wrap: wrap; → Allows buttons to move to another line on smaller screens.</li></ul><h3>Social Button</h3><pre>.social-btn {<br>    padding: 0.4rem 0.9rem;<br>    border-radius: 20px;<br>    background-color: #f8fafc;<br>    color: #0f172a;<br>    text-decoration: none;<br>    font-size: 0.85rem;<br>    font-weight: 500;<br>    border: 1px solid #e2e8f0;<br>    transition: all 0.2s;<br>}</pre><ul><li>padding: 0.4rem 0.9rem; → Adds space inside the button.</li><li>border-radius: 20px; → Creates rounded/pill-shaped buttons.</li><li>background-color → Sets the button background.</li><li>color → Sets the text color.</li><li>text-decoration: none; → Removes the default link underline.</li><li>font-size: 0.85rem; → Sets the text size.</li><li>font-weight: 500; → Makes the text slightly bold.</li><li>border → Adds a light border.</li><li>transition: all 0.2s; → Makes hover changes happen smoothly.</li></ul><h3>Social Button Hover</h3><pre>.social-btn:hover {<br>    background-color: #2563eb;<br>    color: #ffffff;       <br>}</pre><ul><li>.social-btn:hover → Applies these styles when the mouse is over the button.</li><li>background-color → Changes the button background to blue.</li><li>color → Changes the text to white.</li></ul><h3>Contact Form CSS</h3><h3>Card</h3><pre>.card {<br>    background: #ffffff;<br>    border: 1px solid #e2e8f0;<br>    border-radius: 16px;<br>    padding: 2.5rem;<br>}</pre><p>This is another .card rule. It gives the contact form card:</p><ul><li>White background</li><li>Light border</li><li>Rounded corners</li><li>Inner spacing</li></ul><p>As mentioned earlier, this can be combined with your first .card rule.</p><h3>Section Title</h3><pre>.section-title {<br>    font-size: 1.3rem;<br>    font-weight: 600;<br>    margin-bottom: 1.25rem;<br>}</pre><ul><li>font-size → Controls the heading size.</li><li>font-weight: 600; → Makes the heading semi-bold.</li><li>margin-bottom → Adds space below the heading.</li></ul><h3>Form Group</h3><pre>.form-group {<br>    margin-bottom: 1.25rem;<br>}</pre><ul><li>.form-group → Selects each group containing a label and input.</li><li>margin-bottom → Adds space between form fields.</li></ul><h3>Label</h3><pre>label {<br>    display: block;<br>    font-size: 0.875rem;<br>    font-weight: 500;<br>    margin-bottom: 0.4rem;<br>}</pre><ul><li>display: block; → Places the label on its own line.</li><li>font-size → Sets the label text size.</li><li>font-weight: 500; → Makes the label slightly bold.</li><li>margin-bottom → Adds space between the label and input.</li></ul><h3>Input and Textarea</h3><pre>input,<br>textarea {<br>    width: 100%;<br>    padding: 0.75rem;<br>    border: 1px solid #e2e8f0;<br>    border-radius: 8px;<br>    font-family: inherit;<br>    font-size: 0.95rem;<br>    background-color: #f8fafc;<br>    color: #0f172a;<br>}</pre><p>The comma means the same styles apply to both input and textarea.</p><ul><li>width: 100%; → Makes them use the full available width.</li><li>padding: 0.75rem; → Adds space inside the fields.</li><li>border → Adds a light border.</li><li>border-radius: 8px; → Rounds the corners.</li><li>font-family: inherit; → Uses the same font as the parent element.</li><li>font-size → Sets the text size.</li><li>background-color → Gives the fields a light background.</li><li>color → Sets the text color.</li></ul><h3>Input Focus</h3><pre>input:focus,<br>textarea:focus {<br>    outline: none;<br>    border-color: #2563eb;<br>    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);<br>}</pre><p>:focus applies when the user clicks into or selects an input.</p><ul><li>outline: none; → Removes the browser&#39;s default focus outline.</li><li>border-color → Changes the border to blue.</li><li>box-shadow → Creates a soft blue highlight around the field.</li></ul><p><strong>Accessibility note:</strong> Removing the default outline is okay here because you are providing another visible focus indicator through box-shadow.</p><h3>Textarea</h3><pre>textarea {<br>    resize: vertical;<br>    min-height: 120px;<br>}</pre><ul><li>resize: vertical; → Allows the user to resize the textarea vertically, but not horizontally.</li><li>min-height: 120px; → Sets a minimum height of 120 pixels.</li></ul><h3>Submit Button</h3><pre>.submit-btn {<br>    width: 100%;<br>    padding: 0.75rem;<br>    background-color: #2563eb;<br>    color: #ffffff;<br>    border: none;<br>    border-radius: 8px;<br>    font-size: 1rem;<br>    font-weight: 600;<br>    cursor: pointer;<br>}</pre><ul><li>width: 100%; → Makes the button full width.</li><li>padding: 0.75rem; → Adds space inside the button.</li><li>background-color → Makes the button blue.</li><li>color → Makes the text white.</li><li>border: none; → Removes the default border.</li><li>border-radius: 8px; → Rounds the button corners.</li><li>font-size: 1rem; → Sets the button text size.</li><li>font-weight: 600; → Makes the button text semi-bold.</li><li>cursor: pointer; → Changes the mouse cursor to a pointer when hovering over the button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*1O6VhTkgJwTrrkZxyGtGZg.png" /></figure><h3>Key Takeaways</h3><p>HTML and CSS form the foundation of frontend development.</p><p>HTML provides the structure of a webpage, while CSS controls its appearance, layout, and responsiveness. Together, they make it possible to build webpages that are structured, readable, and visually consistent across different screen sizes.</p><p>During this part of Week 1, the focus was on:</p><ul><li>Understanding how websites and browsers work</li><li>Creating webpages using HTML</li><li>Using semantic HTML elements</li><li>Working with forms, links, images, lists, and tables</li><li>Understanding CSS selectors and the box model</li><li>Styling webpages with colors, fonts, spacing, and borders</li><li>Building layouts using Flexbox and Grid</li><li>Making webpages responsive</li><li>Using browser Developer Tools to inspect and debug HTML and CSS</li><li>Building a personal profile page as a practical project</li></ul><p>The goal was not just to memorize HTML tags or CSS properties, but to understand why and when they are used.</p><h3>What’s Next?</h3><p>A webpage can look good with HTML and CSS, but it is still mostly static.</p><p>The next step is to make it interactive. That is where JavaScript comes in.</p><p>In the next part of Week 1, the focus will shift from structure and styling to programming logic and interactivity.</p><p><strong>Week 1 — Part 2: JavaScript Fundamentals is coming next.</strong></p><p><strong>Stay tuned for more! 🚀</strong></p><p><strong>Connect with me</strong></p><ul><li><a href="https://www.linkedin.com/in/jasnafathim/"><strong>LinkedIn</strong></a></li><li><a href="https://github.com/Jasnafathim/"><strong>GitHub</strong></a></li><li><a href="https://medium.com/@jasnafathim"><strong>Medium</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6574a686bba4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Roadmap to Become a MERN Stack Developer — An 8-Week Journey]]></title>
            <link>https://medium.com/@jasnafathim/roadmap-to-become-a-mern-stack-developer-an-8-week-journey-cdff3b7a18e2?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdff3b7a18e2</guid>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mern-stack-development]]></category>
            <category><![CDATA[week-8]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 06:45:42 GMT</pubDate>
            <atom:updated>2026-11-10T06:45:42.762Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Hgf1gUqciZMznMF" /></figure><p>Becoming a full-stack developer can feel overwhelming. There are countless technologies, frameworks, tools, tutorials, and opinions about what you should learn first. So instead of jumping randomly from one technology to another, this series follows a structured <strong>8-week journey to learn the MERN stack</strong>. This isn’t going to be a “learn everything in 8 weeks and become a senior developer” challenge. The goal is much simpler:</p><blockquote><strong>Build a strong foundation, gain practical experience, understand the theory behind the technologies, and become ready to work as a MERN Stack Developer Trainee.</strong></blockquote><h3>What is MERN?</h3><p>MERN stands for:</p><ul><li><strong>MongoDB</strong> — Database</li><li><strong>Express.js</strong> — Backend framework</li><li><strong>React.js</strong> — Frontend library</li><li><strong>Node.js</strong> — JavaScript runtime</li></ul><p>The basic flow looks like this:</p><pre>React<br>  ↓<br>API Request<br>  ↓<br>Node.js + Express<br>  ↓<br>MongoDB<br>  ↓<br>Response<br>  ↓<br>React</pre><p>But the journey doesn’t begin directly with React or Node.js. A strong understanding of web fundamentals is important before moving into full-stack development. The 8-Week Journey:- Here’s the plan:</p><p><strong>Week 1 — Foundation: HTML • CSS • JavaScript</strong></p><p>Topics to Learn:</p><ul><li>HTML5 semantics, forms, accessibility</li><li>CSS layout: Flexbox, Grid, media queries, responsive</li><li>JavaScript basics: variables, types, loops, functions, conditionals</li><li>Data structures: arrays, objects</li><li>DOM manipulation, event handling, Browser DevTools</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Can you build a responsive portfolio site?</li><li>Can your JS to-do list app handle add/edit/delete and persist via localStorage?</li></ol><p><strong>Week 2 — JavaScript Deep Dive &amp; Version Control</strong></p><p>Topics to Learn:</p><ul><li>ES6+: let/const, arrow functions, template literals, destructuring</li><li>Array methods: map, filter, reduce</li><li>Closures, scope, modules</li><li>JSON handling, error handling, localStorage</li><li>Git basics: init, clone, commit, push, branching</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Do your apps use advanced JS features?</li><li>Are your projects version‑controlled and pushed to GitHub?</li></ol><p><strong>Week 3 — Frontend Framework: React Fundamentals</strong></p><p>Topics to Learn:</p><ul><li>React basics: JSX, components, props vs state</li><li>useState, component events, controlled forms</li><li>List rendering, conditional rendering</li><li>useEffect, basic lifecycle patterns</li><li>React Router v6: route setup, navigation, URL params</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Is your state management clean and modular?</li><li>Can you navigate between multiple pages (e.g., blog list app)?</li></ol><p><strong>Week 4 — React Advanced + UI Best Practices</strong></p><p>Topics to Learn:</p><ul><li>useContext &amp; useRef (intro)</li><li>More hooks: custom hooks concept</li><li>UI libraries &amp; styling (e.g., Tailwind, Material UI)</li><li>Form validation patterns</li><li>Performance basics: keys, memoization</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Is your blog UI styled professionally?</li><li>Does your state and context logic work reliably across components?</li></ol><p><strong>Week 5 — Backend Fundamentals: Node.js + Express</strong></p><p>Topics to Learn:</p><ul><li>Node.js environment: modules, NPM, project structure</li><li>Express basics: routing, middleware, JSON handling</li><li>REST API fundamentals: GET, POST, PUT, DELETE</li><li>Error handling in backend</li><li>Postman for endpoint testing</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Can you build a working CRUD API?</li><li>Have you tested all endpoints with expected responses?</li></ol><p><strong>Week 6 — Database &amp; Full‑Stack Integration</strong></p><p>Topics to Learn:</p><ul><li>MongoDB basics and Mongoose schema design</li><li>CRUD operations in Express + Mongo</li><li>Connecting React frontend to backend via Axios/fetch</li><li>Handling async code and errors front and back</li><li>Basic environment variables setup</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Does your full-stack Task or Blog app create/read/update/delete data end‑to‑end?</li><li>Data persists correctly in MongoDB Atlas or local instance?</li></ol><p><strong>Week 7 — Next.js Introduction &amp; TypeScript Integration</strong></p><p>Topics to Learn:</p><ul><li>Next.js fundamentals: file-based routing, pages vs components</li><li>Data fetching: SSR, SSG, ISR basics</li><li>API routes in Next.js</li><li>TypeScript basics: types, interfaces, typed React props/state</li><li>Setting up a Next.js + TypeScript starter</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Can you build a simple Next.js page with TypeScript?</li><li>Are your types catching errors during development?</li></ol><p><strong>Week 8 — Capstone Project &amp; Deployment</strong></p><p>Topics to Learn:</p><ul><li>Full-stack capstone: MERN or Next.js + Express + Mongo + TS</li><li>Deployment: frontend (Vercel/Netlify), backend (Render/Railway), MongoDB Atlas</li><li>Environment variables in production</li><li>Code quality: folder structure, typing, error handling</li></ul><p><strong>How to Self‑Check Progress:</strong></p><ol><li>Is your final app live and functional?</li><li>Does it meet project requirements and run without console/server errors?</li><li>Do you feel confident explaining how each part of your stack works?</li><li>Have you prepared answers for top interview topics like MERN components, React hooks, REST APIs, TypeScript types, and Next.js SSR/SSG?</li></ol><h3><strong>The Learning Philosophy</strong></h3><p>This journey is not about simply finishing tutorials. The focus is on understanding why things work and gaining the ability to build without constantly depending on tutorials.</p><p>The learning cycle to follow is:</p><pre>Learn<br>  ↓<br>Practice<br>  ↓<br>Build<br>  ↓<br>Break<br>  ↓<br>Debug<br>  ↓<br>Understand<br>  ↓<br>Build Again</pre><h4><strong>One rule to follow</strong></h4><blockquote><strong>If you can’t explain your code, you don’t really know it.</strong></blockquote><p>Tutorials are useful for exposure, but real skill comes from writing code, making mistakes, debugging problems, and finding solutions.</p><h4><strong>Using AI as a Learning Tool</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7nxDKd9QQm-6wniJ" /></figure><p>AI can be a powerful learning assistant, but it should not replace problem-solving. AI can be used for:</p><ul><li>Concept clarification</li><li>Understanding errors</li><li>Code reviews</li><li>Exploring alternative approaches</li><li>Getting hints when stuck</li><li>Improving understanding</li></ul><p>But avoid:</p><ul><li>Blindly copying generated code</li><li>Building projects that can’t be explained</li><li>Using AI instead of debugging</li><li>Asking AI to solve every problem immediately</li></ul><p>The goal is not to have AI write the code. The goal is to use AI to become better at understanding, writing, and debugging code.</p><h3>What Should Be Achieved After 8 Weeks?</h3><p>By the end of the journey, the target is to have:</p><ul><li>Strong HTML &amp; CSS fundamentals</li><li>Good JavaScript fundamentals</li><li>Practical React experience</li><li>Node.js and Express knowledge</li><li>MongoDB experience</li><li>REST API knowledge</li><li>Authentication experience</li><li>Git &amp; GitHub experience</li><li>Several small projects</li><li>At least one complete MERN project</li><li>A better understanding of debugging</li><li>A portfolio demonstrating practical knowledge</li></ul><p>Most importantly, the goal is to be able to understand, explain, debug, and improve the applications being built.</p><h3>This Is Just the Beginning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H0j1EQOH6KHcxtqU" /></figure><p>Eight weeks won’t make anyone an expert.</p><p>There will still be a lot more to learn. The purpose of these eight weeks is to build a <strong>strong foundation</strong> and develop the practical skills required to continue growing as a developer. Each week will be documented separately, covering:</p><p><strong><em>What was learned → What was practiced → What was built → Problems encountered → How they were solved → Key takeaways</em></strong></p><p><strong>Week 1 is coming next.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vmqd3CCfbnttQu4O" /></figure><p>Stay tuned as we start with Web Fundamentals and HTML, CSS, JavaScript.</p><p><strong>Connect with me</strong></p><ul><li><a href="https://www.linkedin.com/in/jasnafathim/"><strong>LinkedIn</strong></a></li><li><a href="https://github.com/Jasnafathim/"><strong>GitHub</strong></a></li><li><a href="https://medium.com/@jasnafathim"><strong>Medium</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdff3b7a18e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build Notes website using HTML, CSS, JavaScript]]></title>
            <link>https://medium.com/@jasnafathim/how-to-build-notes-website-using-html-css-javascript-a8de10dc6359?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8de10dc6359</guid>
            <category><![CDATA[localstorage]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mini-projects]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Fri, 25 Sep 2026 17:31:53 GMT</pubDate>
            <atom:updated>2026-09-25T17:31:53.027Z</atom:updated>
            <content:encoded><![CDATA[<p>In this we will learn to make a Notes in website- with HTML, CSS, JavaScript. And in this we are using local storage that will store the notes in our web browser, so that if we close or restart the browser, then also it will display our saved notes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GkdNUzhYHcibplRW" /></figure><h3>Project Overview</h3><p>The website provides a simple interface where users can:<br>- Create notes<br>- Edit notes<br>- Delete notes<br>- Save notes automatically<br>- Access saved notes after reopening the browser</p><p>The project was built using:<br>- HTML<br>- CSS<br>- JavaScript<br>- Browser Local Storage</p><p>The website contains a heading called <strong>Notes</strong>, a <strong>Create Notes</strong> button. Each note also contains a delete icon that allows the user to remove the note and can edit the note also.</p><h3>Working</h3><p>There is a one button named as create notes, if we click there it will open one input box and there we can type our text note. Then again we click that button again it will open a new input box where we can add another note. There is also an icon button for delete in input box. If we click on that delete icon it will delete that note. If we close the browser and open browser again, we can see the notes is still displaying there. Because we have added the local storage that will store the notes in the browser.</p><p><strong>HTML Structure<br></strong>The main page contains a container with the Notes heading, create button, and notes container.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Note&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;h1&gt;&lt;img src=&quot;images/notes.png&quot; alt=&quot;note&quot;&gt;Notes&lt;/h1&gt;<br>        &lt;button class=&quot;btn&quot;&gt;&lt;img src=&quot;images/edit.png&quot; alt=&quot;note&quot;&gt;create notes&lt;/button&gt;<br>        &lt;div class=&quot;notes-container&quot;&gt;            <br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>    &lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>The notes-container is initially empty. JavaScript dynamically adds notes when the user clicks the Create Notes button.</p><p><strong>Styling with CSS<br></strong>CSS is used to create the appearance of the website. Used a gradient background:</p><pre>*{<br>    margin: 0;<br>    padding: 0;<br>    font-family: &#39;Poppins&#39;,sans-serif;<br>    box-sizing: border-box;<br>}<br>.container{<br>    width: 100%;<br>    min-height: 100vh;<br>    background: linear-gradient(135deg, #cf9aff,#95c0ff);<br>    color: #fff;<br>    padding-top:4%;<br>    padding-left:10%;<br><br>}<br>.container h1{<br>    display: flex;<br>    align-items: center;<br>    font-size: 35px;<br>    font-weight: 600;<br>}<br>.container h1 img{<br>    width: 60px;<br>}<br>.container button img{<br>    width: 25px;<br>    margin-right: 8px;<br>}<br>.container button{<br>    display:flex;<br>    align-items: center;<br>    background: linear-gradient(#9418fd,#571094);<br>    color: #fff;<br>    font-size: 16px;<br>    outline: 0;<br>    border: 0;<br>    border-radius: 40px;<br>    padding: 15px 25px;<br>    margin: 30px 0 20px;<br>    cursor: pointer;<br>}<br>.input-box{<br>    position: relative;<br>    width: 100%;<br>    max-width: 500px;<br>    min-height: 150px;<br>    background: #fff;<br>    color: #333;<br>    padding: 20px;<br>    margin: 20px 0;<br>    outline: none;<br>    border-radius: 5px;<br>}<br>.input-box img{<br>    width: 25px;<br>    position: absolute;<br>    bottom: 15px;<br>    right: 15px;<br>    cursor: pointer;<br>}</pre><p><strong>Creating Notes with JavaScript<br></strong>When the user clicks the Create Notes button, JavaScript creates a new &lt;p&gt; element.</p><pre>createBtn.addEventListener(&quot;click&quot;, ()=&gt;{<br>    let inputBox=document.createElement(&quot;p&quot;);<br>    let img=document.createElement(&quot;img&quot;);<br>    inputBox.className=&quot;input-box&quot;;<br>    inputBox.setAttribute(&quot;contenteditable&quot;,&quot;true&quot;);<br>    img.src=&quot;images/delete.png&quot;;<br>    notesContainer.appendChild(inputBox).appendChild(img);<br>})</pre><p>The contenteditable attribute makes the note editable directly in the browser.</p><p><strong>Using Local Storage<br></strong>One of the important parts of this project is saving the notes. Used localStorage to store the HTML content of the notes container.</p><pre>function updateStorage(){<br>    localStorage.setItem(&quot;notes&quot;,notesContainer.innerHTML);<br>}</pre><p>When the website is opened again, the saved notes are retrieved:</p><pre>function showNotes(){<br>    notesContainer.innerHTML=localStorage.getItem(&quot;notes&quot;);<br>}</pre><p>This means the notes don’t disappear when the browser is refreshed.</p><p><strong>Deleting Notes<br></strong>Added a click event to the notes container to detect when the delete icon is clicked.</p><pre>notesContainer.addEventListener(&quot;click&quot;, function(e){<br>    if(e.target.tagName === &quot;IMG&quot;){<br>        e.target.parentElement.remove();<br>        updateStorage();<br>    }    <br>})</pre><p>When the image is clicked, its parent note is removed and the updated notes are saved to Local Storage.</p><p><strong>Handling the Enter Key<br></strong>Also prevented the normal Enter behavior inside the editable note and used a line break instead.</p><pre>document.addEventListener(&quot;keydown&quot;, event =&gt;{<br>    if(event.key === &quot;Enter&quot;){<br>        document.execCommand(&quot;insertLineBreak&quot;);<br>        event.preventDefault();<br>    }<br>})</pre><p>This allows users to create a new line inside a note without creating a new paragraph element.</p><p><strong>Screenshots</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83GcfymP97rbHfBMQCanug.png" /><figcaption>Front Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UFSsDLoGmgRJykTqF0TkAw.png" /><figcaption>Adding notes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQUz2jY1l2ri6vZCnQcYPw.png" /><figcaption>Adding Multiple Notes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNPnawQTK7Cv4_Mzj9ltHg.png" /><figcaption>After Deletion</figcaption></figure><p><strong>Live Demo: </strong><a href="https://jasnafathim.github.io/Notes--website/">https://jasnafathim.github.io/Notes--website/</a><br><strong>Source Code: </strong><a href="https://github.com/Jasnafathim/Notes--website">https://github.com/Jasnafathim/Notes--website</a></p><p><strong>What we learned<br></strong>Building this project helped to practice several important JavaScript concepts:</p><ul><li>DOM manipulation</li><li>Event listeners</li><li>Dynamic element creation</li><li>Local Storage</li><li>Getting and setting HTML content</li><li>Handling keyboard events</li><li>Basic HTML and CSS design</li></ul><p><strong>Future Improvements<br></strong>I would like to improve this project further by adding:</p><ul><li>Dark mode</li><li>Search notes</li><li>Note categories</li><li>Different note colors</li><li>Date and time for each note</li><li>Better mobile responsiveness</li><li>Confirmation before deleting a note</li></ul><h3><strong>Conclusion</strong></h3><p>This project was a useful hands-on exercise for understanding how HTML, CSS, and JavaScript work together to create an interactive website.</p><p>The Local Storage feature was particularly useful because it allowed to build a small application that can retain user data without requiring a backend or database.</p><p>Plan to continue improving this project while strengthening my frontend development skills.</p><p><strong>For more details connect with me</strong></p><ul><li><a href="https://www.linkedin.com/in/jasnafathim/"><strong>LinkedIn</strong></a></li><li><a href="https://github.com/Jasnafathim/"><strong>GitHub</strong></a></li><li><a href="https://medium.com/@jasnafathim"><strong>Medium</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8de10dc6359" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a “Detect My Location” Web App Using JavaScript in 5 Minutes!]]></title>
            <link>https://medium.com/@jasnafathim/build-a-detect-my-location-web-app-using-javascript-in-5-minutes-6ada429cdcbb?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ada429cdcbb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[geolocation]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sun, 12 Oct 2025 15:28:16 GMT</pubDate>
            <atom:updated>2025-10-12T15:28:16.763Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>Have you ever visited a website that automatically detects where you are and tailors information accordingly? <br>In this article, we’ll build a simple User Location Finder app using just HTML, CSS, and JavaScript — no frameworks needed!</p><p>We’ll also use the OpenCage Geocoding API to convert latitude and longitude into a readable address (like city and country).</p><h4>What You’ll Learn</h4><ul><li>Access the user’s location using the <strong>Geolocation API</strong></li><li>Convert coordinates into real-world locations</li><li>Handle user permissions and errors gracefully</li><li>Style a clean and modern UI</li></ul><h4>Tech Stack</h4><ul><li>HTML5</li><li>CSS3</li><li>JavaScript (Vanilla)</li><li>OpenCage Geocoding API</li></ul><h4>Steps</h4><ol><li>HTML Setup</li></ol><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;User Location Finder&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>   &lt;button&gt;Detect Your Location&lt;/button&gt;<br>   &lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt; <br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Simple and minimal — just one button to trigger the location detection.</p><p>2. CSS Styling</p><pre>*{<br>    margin: 0;<br>    padding: 0;<br>    box-sizing: border-box;<br>    font-family:Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;<br>}<br>body{<br>    display: flex;<br>    align-items: center;<br>    justify-content: center;<br>    min-height: 100vh;<br>    background: linear-gradient(#252930 50%,#5372F0 50%);<br>}<br>button{<br>    font-size: 50px;<br>    padding: 25px 46px;<br>    background: #fff;<br>    border: none;<br>    outline: none;<br>    border-radius: 10px;<br>    font-weight: 500;<br>    color: #5372F0;<br>    cursor: pointer;<br>}</pre><p>This gives a clean gradient background and a prominent button.</p><p>3. JavaScript Logic</p><pre>const button=document.querySelector(&quot;button&quot;);<br><br>button.addEventListener(&quot;click&quot;, ()=&gt;{<br>    if(navigator.geolocation){<br>        button.innerText=&quot;Allow to detect Location&quot;;<br>        navigator.geolocation.getCurrentPosition(onSuccess,onError);<br>    }else{<br>        button.innerText=&quot;browser did not support&quot;;<br>    }<br>});<br><br>function onSuccess(position){<br>    button.innerText=&quot;Detecting your Location&quot;;<br>    let {latitude,longitude}=position.coords;<br>    <br>fetch(`https://api.opencagedata.com/geocode/v1/json?q=${latitude}+${longitude}&amp;key=YOUR_API_KEY`)<br>.then(response=&gt;response.json()).then(result =&gt;{<br>        let allDetails=result.results[0].components;<br>        let {county,postcode,state_district,state,country}=allDetails;<br>        button.innerText=`${county} ${postcode} ${state_district} ${state} ${country} `;<br>        console.table(allDetails);<br>    }).catch(()=&gt;{<br>        button.innerText=&quot;something went wrong&quot;;<br>    })<br>}<br><br>function onError(error){<br>    if(error.code == 1){<br>        button.innerText=&quot;you denied the request&quot;;<br>    }<br>    else if(error.code == 2){<br>        button.innerText=&quot;Location Not Available&quot;;<br>    }<br>    else{<br>        button.innerText=&quot;something went wrong&quot;;<br>    }<br>    button.setAttribute(&quot;disabled&quot;,&quot;true&quot;);<br>}</pre><p>4. Get Your API Key</p><ul><li>Sign up at OpenCage Data</li><li>Copy your <strong>API key</strong> and replace YOUR_API_KEY in the code.</li></ul><p>5. Test It!</p><ul><li>Open index.html in your browser.</li><li>Click the <strong>Detect Your Location</strong> button and allow location access.</li><li>You’ll see your area’s name appear on the button itself!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dlli2XMiwqpseyr6TDBtBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSHqhV-PO3hJb2uSzQHxPQ.png" /></figure><h4>Conclusion</h4><p>You’ve just built a real-world <strong>geolocation app</strong> that can detect and display user addresses with minimal code.<br> You can extend this by:</p><ul><li>Displaying a map (using Leaflet or Google Maps),</li><li>Storing user locations in a database,</li><li>Or creating a location-based weather app</li></ul><h4>Final Thoughts</h4><p>Building small projects like this helps you understand real APIs, handle async JavaScript, and create user-friendly web experiences.</p><h4>Links</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/">LinkedIn</a></li><li><a href="https://github.com/Jasnafathim/">GitHub</a></li><li><a href="https://medium.com/@jasnafathim">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ada429cdcbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Responsive Hangman Game with HTML, CSS, and JavaScript]]></title>
            <link>https://medium.com/@jasnafathim/building-a-responsive-hangman-game-with-html-css-and-javascript-ab14d959b76a?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab14d959b76a</guid>
            <category><![CDATA[hangman-game]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[intermediate]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sun, 28 Sep 2025 11:38:54 GMT</pubDate>
            <atom:updated>2025-09-28T11:38:54.991Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the best ways to learn and practice JavaScript is by building small but interactive projects. Recently, I created a <strong>responsive Hangman Game</strong> where the player has to guess a hidden word within six chances — each wrong guess reveals part of the hangman until the game ends.</p><p>In this article, I’ll walk you through the project, its features, and how you can try it yourself.</p><h4>What is Hangman?</h4><p>Hangman is a classic word-guessing game.</p><ul><li>A random word is chosen.</li><li>The player guesses letters one at a time.</li><li>Each wrong guess draws part of the “hangman.”</li><li>The goal is to guess the full word before the hangman is complete.</li></ul><p>For my version, players have <strong>6 wrong guesses</strong> before losing the game.</p><h4>Features of My Hangman Game</h4><ul><li>️ Random word generator with hints</li><li>Virtual keyboard for easy guessing</li><li>Responsive design</li><li>Progressive hangman illustration for wrong guesses</li><li>Restart option to play again</li></ul><h4>Technologies Used</h4><ul><li>HTML</li><li>CSS</li><li>JavaScript</li></ul><pre>hangman-game/<br>├── index.html          # Main HTML file<br>├── style.css           # Stylesheet<br>├── scripts/<br>│   ├── script.js       # Game logic<br>│   └── word-list.js    # Word list with hints<br>├── images/             # Hangman illustrations &amp; GIFs</pre><h4>How It Works</h4><ol><li><strong>Random Word Selection</strong><br> A random word and hint are chosen from word-list.js.</li></ol><pre>const getRandomWord=() =&gt;{<br>    const {word, hint}=wordList[Math.floor(Math.random()*wordList.length)];<br>    currentWord=word;<br>    //console.log(word);<br>    document.querySelector(&quot;.hint-text b&quot;).innerText=hint;<br>    resetGame();<br>    <br>}</pre><p>2. <strong>Virtual Keyboard</strong><br> JavaScript dynamically generates A–Z buttons for guessing.</p><pre>for (let i = 97; i &lt;= 122; i++){<br>    const button=document.createElement(&quot;button&quot;);<br>    button.innerText=String.fromCharCode(i);<br>    keyboardDiv.appendChild(button);<br>    button.addEventListener(&quot;click&quot;,e=&gt;initGame(e.target,String.fromCharCode(i)));<br>}</pre><p><strong>3. Game Logic</strong></p><ul><li>If the guess is correct — the letter is revealed.</li><li>If incorrect — hangman image updates.</li><li>After <strong>6 wrong guesses</strong>, the game ends with “Game Over.”</li></ul><h4>User Interface</h4><ul><li>The left side shows the <strong>hangman illustration</strong>.</li><li>The right side displays:<br>- Word placeholders (underscores for hidden letters)<br>- Hint for the word<br>- Wrong guesses counter<br>- On-screen keyboard</li></ul><p>Here’s how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDUrlImsieHGIfzjhrrULg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uSpIMuHaF4x9Hj3wthIvWw.png" /></figure><h4>Lessons Learned</h4><ul><li>How to <strong>manipulate the DOM</strong> to update letters and images dynamically.</li><li>How to use <strong>JavaScript arrays/objects</strong> for word storage.</li><li>Building a <strong>responsive layout</strong> with HTML + CSS.</li><li>Handling <strong>game state and events</strong> (win/lose conditions).</li></ul><p><strong>Source Code:</strong> <a href="https://github.com/Jasnafathim/Hangman-Game">https://github.com/Jasnafathim/Hangman-Game</a></p><h4>Conclusion</h4><p>This Hangman Game was a fun way to strengthen my JavaScript skills while building something interactive. The project combines <strong>logic, DOM manipulation, and responsive design</strong> — making it a great learning exercise for beginners.</p><p>If you’re learning web development, I highly recommend recreating this project or customizing it further (e.g., adding difficulty levels, animations, or sound effects).</p><h4>Links</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/">LinkedIn</a></li><li><a href="https://github.com/Jasnafathim/">GitHub</a></li><li><a href="https://medium.com/@jasnafathim">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab14d959b76a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Query to Picture: Create an Image Search Engine with JavaScript & Unsplash API]]></title>
            <link>https://medium.com/@jasnafathim/from-query-to-picture-create-an-image-search-engine-with-javascript-unsplash-api-81bd056217fc?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/81bd056217fc</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[unsplash-api]]></category>
            <category><![CDATA[simple-project]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 17:20:37 GMT</pubDate>
            <atom:updated>2025-09-06T17:20:37.694Z</atom:updated>
            <content:encoded><![CDATA[<p>Learn how to create a beautiful image search engine using HTML, CSS, JavaScript, and Unsplash API.</p><p>Have you ever wanted to build your own image search engine? In this tutorial, we’ll create a simple yet powerful image search app using <strong>JavaScript</strong> and the <strong>Unsplash API</strong>.<br>With just a few lines of code, you’ll learn how to fetch real-time images from Unsplash and display them dynamically on your webpage.</p><h4>Project Overview</h4><p>This project allows users to search for any image by entering a keyword. Once the user hits Search, the app fetches high-quality stock images from the Unsplash API and displays them instantly in a clean and responsive interface.</p><h4>Features</h4><ol><li>Search images by keyword</li><li>Fetch images from Unsplash API</li><li>Dynamic image display</li><li>Responsive and mobile-friendly UI</li><li>Fast and lightweight</li></ol><h4>Technologies Used</h4><ul><li><strong>HTML5</strong> → Page structure</li><li><strong>CSS3</strong> → Styling and responsiveness</li><li><strong>JavaScript (ES6)</strong> → Logic and API integration</li><li><strong>Unsplash API</strong> → Fetching real-time images</li></ul><h4>How It Works</h4><p>The working of the project is simple:<br>The user enters a keyword in the search bar, clicks the search button, and the app fetches high-quality images from the Unsplash API based on the entered text, then displays the results instantly on the page.</p><h4>How to Get Your Unsplash API Key</h4><ol><li>Go to <a href="https://unsplash.com/developers">Unsplash Developer</a></li><li>Sign up or log in.</li><li>Create a new app to get your Access Key.</li><li>Replace it inside your script.js file:</li></ol><p>GitHub Project Repository: <a href="https://github.com/Jasnafathim/Image-Search">https://github.com/Jasnafathim/Image-Search</a></p><h4>Screenshots</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_6-kfEp3-X-Zz7sAfer5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8q91-m_YGypyKz1AKrGug.png" /></figure><h4>Project Summary</h4><p>This project is a simple Image Search Engine that allows users to find high-quality stock images using the Unsplash API.<br> It demonstrates API integration, JavaScript DOM manipulation, and responsive web design. Perfect for beginners to learn fetch API and real-world JavaScript projects.</p><h4>Conclusion</h4><p>You’ve successfully built an Image Search Engine using JavaScript and Unsplash API.<br> This project is perfect for beginners learning API integration and DOM manipulation.</p><h4>Links</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/">LinkedIn</a></li><li><a href="https://github.com/Jasnafathim/">GitHub</a></li><li><a href="https://medium.com/@jasnafathim">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81bd056217fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Text-to-Speech Converter Using JavaScript]]></title>
            <link>https://medium.com/@jasnafathim/create-a-text-to-speech-converter-using-javascript-3ed0d8495bbd?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ed0d8495bbd</guid>
            <category><![CDATA[javascript-projects]]></category>
            <category><![CDATA[text-to-speech]]></category>
            <category><![CDATA[web-speech-api]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sun, 31 Aug 2025 10:33:21 GMT</pubDate>
            <atom:updated>2025-08-31T10:33:21.948Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wanted to convert text into speech directly in your browser without using external libraries or APIs?<br> In this article, we’ll build a Text-to-Speech Converter using HTML, CSS, and JavaScript by leveraging the Web Speech API.<br> This project also supports multiple voice options to make it more interactive and fun!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V0oAHKY4obmCmFusv3eDPQ.png" /></figure><p><strong>Live Demo<br></strong><a href="https://jasnafathim.github.io/Text-to-Speech/">Try here</a></p><p><strong>GitHub Repo</strong>: <a href="https://github.com/Jasnafathim/Text-to-Speech">Click Here</a></p><h4>What You’ll Learn</h4><ul><li>How to use the Web Speech API</li><li>How to fetch available system voices</li><li>How to create an interactive UI</li><li>How to add event-driven programming</li><li>How to make the project responsive and user-friendly</li></ul><h4>Tech Stack</h4><ul><li><strong>HTML5</strong> → Structure</li><li><strong>CSS3</strong> → Styling &amp; Layout</li><li><strong>JavaScript (ES6)</strong> → Speech Functionality</li><li><strong>Web Speech API</strong> → Text-to-Speech Conversion</li></ul><h4>Features</h4><ol><li>Convert <strong>text into speech</strong> instantly</li><li>Choose from <strong>multiple voices</strong></li><li>User-friendly <strong>clean interface</strong></li><li>Works in <strong>modern browsers</strong></li><li>No third-party libraries required</li></ol><h4>Project Structure</h4><pre>text-to-speech/<br>│── index.html      # HTML structure<br>│── style.css       # Styling and layout<br>│── script.js       # Speech synthesis functionality</pre><h4>Steps</h4><p>Step 1— Create the HTML</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Text to Speech&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css&quot;&gt;<br><br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;hero&quot;&gt;<br>        &lt;h1&gt;Text to Speech &lt;span&gt;Converter&lt;/span&gt;&lt;/h1&gt;<br>        &lt;textarea placeholder=&quot;Write anything here....&quot; &gt;&lt;/textarea&gt;<br>        &lt;div class=&quot;row&quot;&gt;<br>            &lt;select&gt;&lt;/select&gt;<br>            &lt;button&gt;&lt;i class=&quot;fa-solid fa-play&quot;&gt;&lt;/i&gt;Listen&lt;/button&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>    &lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Step 2 — Add Some CSS</p><pre>*{<br>    margin: 0;<br>    padding: 0;<br>    font-family:&#39;Times New Roman&#39;, Times, serif;<br>    box-sizing: border-box;<br>}<br>.hero{<br>    width: 100%;<br>    min-height: 100vh;<br>    background: linear-gradient(45deg,#010758,#490d61);<br>    display: flex;<br>    align-items: center;<br>    justify-content: center;<br>    flex-direction: column;<br>    color: #fff;<br>}<br>.hero h1{<br>    font-size: 45px;<br>    font-weight: 500;<br>    margin-top: -50px;<br>    margin-bottom: 50px;<br>}<br>.hero h1 span{<br>    color:#ff2963<br>}<br>textarea{<br>    width: 600px;<br>    height: 250px;<br>    background: #403d84;<br>    color: #fff;<br>    font-size: 15px;<br>    border: 0;<br>    outline: 0;<br>    padding: 20px;<br>    border-radius: 10px;<br>    resize: none;<br>    margin-bottom: 30px;<br>}<br>textarea::placeholder{<br>    font-size: 16px;<br>    color:#ddd;<br>}<br>.row{<br>    width:600px;<br>    display: flex;<br>    align-items: center;<br>    gap: 20px;<br>}<br>button{<br>    background: #ff2963;<br>    color: #fff;<br>    font-size: 16px;<br>    padding: 10px 30px;<br>    border-radius: 35px;<br>    border: 0;<br>    outline: 0;<br>    cursor: pointer;<br>}<br>button i{<br>    width: 16px;<br>    margin-right: 10px;<br>}<br>select{<br>    flex: 1;<br>    color: #fff;<br>    background: #403d84;<br>    height:50px;<br>    padding:0 20px;<br>    outline: 0;<br>    border: 0;<br>    border-radius: 35px;<br>    <br>}</pre><p>Step 3 — Add JavaScript Functionality</p><pre>let speech=new SpeechSynthesisUtterance();<br>let voices=[];<br>let voiceselect=document.querySelector(&quot;select&quot;);<br><br>window.speechSynthesis.onvoiceschanged=()=&gt;{<br>    voices=window.speechSynthesis.getVoices();<br>    speech.voice=voices[0];<br><br>    voices.forEach((voice,i)=&gt;(voiceselect.options[i]=new Option(voice.name,i)));<br>};<br><br>voiceselect.addEventListener(&quot;change&quot;,()=&gt;{<br>    speech.voice=voices[voiceselect.value];<br>});<br><br>document.querySelector(&quot;button&quot;).addEventListener(&quot;click&quot;,()=&gt;{<br>    speech.text=document.querySelector(&quot;textarea&quot;).value;<br>    window.speechSynthesis.speak(speech);<br>});</pre><h4>How It Works</h4><ol><li>Web Speech API provides SpeechSynthesis</li><li>Fetches all available voices on the system</li><li>User enters text and selects voice</li><li>The browser converts the text into speech</li></ol><h4>Key Learnings</h4><ul><li>Usage of Web Speech API for voice synthesis</li><li>Creating custom UI elements</li><li>Populating voices dynamically</li><li>Handling event-driven JavaScript</li><li>Integrating multimedia features without external libraries</li></ul><h4>Final Thoughts</h4><p>This Text-to-Speech Converter is a beginner-friendly JavaScript project.<br> It demonstrates real-world browser APIs and improves your understanding of DOM manipulation, events, and multimedia integration.</p><h4>Useful Links</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/"><strong>LinkedIn</strong></a></li><li><a href="https://github.com/Jasnafathim/"><strong>GitHub</strong></a></li><li><a href="https://medium.com/@jasnafathim"><strong>Medium</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ed0d8495bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a QR Code Generator Using JavaScript (With free API)]]></title>
            <link>https://medium.com/@jasnafathim/how-to-create-a-qr-code-generator-using-javascript-with-free-api-f98814bde6f6?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f98814bde6f6</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[qrcodegenerator]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sun, 24 Aug 2025 10:22:14 GMT</pubDate>
            <atom:updated>2025-08-24T10:22:14.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h3Js_qydNY230J_g" /></figure><p>Do you want to create your own QR Code Generator? We’ll build a simple, responsive, and interactive QR Code Generator website using HTML, CSS, and JavaScript.</p><p>We’ll use the <strong>Free QR Code Generator API </strong><a href="https://goqr.me/api/">https://goqr.me/api/</a> to generate QR codes dynamically for any text or URL.</p><p>By the end of this, you’ll have a fully functional<strong> </strong>QR Code Generator website!</p><h4>Introduction</h4><p>The interface consists of an input box and a button. Users can enter any text or URL, click the button, and generate a corresponding QR code. The QR code dynamically updates based on the input, allowing users to scan it with a mobile device to either open a URL or display text.</p><h3>What We’re Building</h3><p>A minimal interface with:</p><ul><li>An input box for text or URL</li><li>A Generate QR Code button</li><li>A space where the QR image appears</li><li>Smooth reveal animation and an error shake if input is empty</li></ul><h4>API</h4><p>We’re using the Free QR Code Generator API: <a href="https://goqr.me/api/">https://goqr.me/api/</a> .By appending the user input as a query parameter to the API URL, the server returns a QR code image representing the text or URL. This API is free and simple to use.</p><h4>Project Structure</h4><p>│── index.html<br>│── style.css</p><p>A folder is set up containing three main files: an HTML file, a CSS file, and a JavaScript section embedded inside the HTML. The HTML file contains the basic webpage structure and links to the CSS stylesheet. We can use Visual Studio Code as the code editor, but any editor will suffice.</p><h4>HTML</h4><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;QR Code Generator&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;div class=&quot;container&quot;&gt;<br>        &lt;p&gt;Enter your text or URL&lt;/p&gt;<br>        &lt;input type=&quot;text&quot; placeholder=&quot;Text or URL&quot; id=&quot;qrText&quot;&gt;<br><br>        &lt;div id=&quot;imgBox&quot;&gt;<br>            &lt;img src=&quot;&quot; id=&quot;qrImage&quot;&gt;<br>        &lt;/div&gt;<br><br>        &lt;button onclick=&quot;GenerateQR()&quot;&gt;Generate QR Code&lt;/button&gt;<br><br>    &lt;/div&gt;<br>    &lt;script&gt;<br>        let imgBox=document.getElementById(&quot;imgBox&quot;);<br>        let qrImage=document.getElementById(&quot;qrImage&quot;);<br>        let qrText=document.getElementById(&quot;qrText&quot;);<br><br>        function GenerateQR(){<br>            if(qrText.value.length&gt;0){<br>                qrImage.src=&quot;https://api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=&quot; + qrText.value;<br>                imgBox.classList.add(&quot;show-img&quot;);<br>            }<br>            else{<br>                qrText.classList.add(&#39;error&#39;);<br>                setTimeout(()=&gt;{<br>                    qrText.classList.remove(&#39;error&#39;);<br>                },1000)<br>            }<br>        }<br><br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h4>CSS Styling</h4><pre>*{<br>    margin: 0;<br>    padding: 0;<br>    font-family: &#39;Lucida Sans&#39;, &#39;Lucida Sans Regular&#39;, &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Geneva, Verdana, sans-serif;<br>    box-sizing: border-box;<br>}<br>body{<br>    background: #262a2f;<br>}<br>.container{<br>    width: 400px;<br>    padding: 25px 35px;<br>    position: absolute;<br>    top: 50%;<br>    left: 50%;<br>    transform: translate(-50%, -50%);<br>    background: #fff;<br>    border-radius: 10px;<br>}<br>.container p{<br>    font-weight: 600;<br>    font-size: 15px;<br>    margin-bottom: 8px;<br>}<br>.container input{<br>    width: 100%;<br>    height: 50px;<br>    border: 1px solid #494eea;<br>    outline: 0;<br>    padding: 10px;<br>    margin: 10px 0 20px;<br>    border-radius: 5px;<br>}<br>.container button{<br>    width:100%;<br>    height: 50px;<br>    background: #494eea;<br>    color: #fff;<br>    border: 0;<br>    outline: 0;<br>    border-radius: 5px;<br>    box-shadow: 0 10px 10px rgb(0, 0, 0, 0.1);<br>    cursor: pointer;<br>    margin: 20px 0;<br>    font-weight: 500;<br>}<br>#imgBox{<br>    width: 150px;<br>    border-radius: 5px;<br>    max-height: 0;<br>    overflow: hidden;<br>    transition: max-height 1s;<br>    <br>}<br>#imageBox img{<br>    width: 100%;<br>    padding: 10px;    <br>}<br>#imgBox.show-img{<br>    max-height: 300px;<br>    margin: 10px auto;<br>    border: 1px solid #d1d1d1;<br>}<br>.error{<br>    animation: shake 0.1s linear 10;<br>}<br>@keyframes shake{<br>    0%{<br>        transform: translateX(0);<br>    }<br>    25%{<br>        transform: translateX(-2px);<br>    }<br>    50%{<br>        transform: translateX(0);<br>    }<br>    75%{<br>        transform: translateX(2px);<br>    }<br>    100%{<br>        transform: translateX(0);<br>    }<br>}</pre><p>To prevent generating QR codes for empty inputs, JavaScript checks if the input length before generating the QR code. If the input is empty when the button is clicked, an error animation on the input box is triggered. This animation shakes the input field to indicate an error and removed via JavaScript with a timeout.</p><h4>Test the Flow</h4><ul><li>Enter any text or link</li><li>Click Generate QR Code</li><li>A QR image appears with a reveal animation</li><li>Scan the QR using your phone camera</li></ul><p><strong>Live Demo: </strong><a href="https://jasnafathim.github.io/QR-Code-Generator/">https://jasnafathim.github.io/QR-Code-Generator/</a><br><strong>Source Code: </strong><a href="https://github.com/Jasnafathim/QR-Code-Generator">https://github.com/Jasnafathim/QR-Code-Generator</a></p><h4>Screenshot</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orVp1kwPGCrV_14qfrmLdA.png" /></figure><h4>Conclusion</h4><p>You just built a fully functional <strong>QR Code Generator</strong> with a clean UI, smooth animations, and live API integration — no frameworks needed. This is a great beginner-friendly project to practice DOM manipulation, event handling, and simple API usage.</p><h4>Connect with Me</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/">LinkedIn</a></li><li><a href="https://github.com/Jasnafathim/">GitHub</a></li><li><a href="https://medium.com/@jasnafathim">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f98814bde6f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a Random Quote Generator (with API)]]></title>
            <link>https://medium.com/@jasnafathim/build-a-random-quote-generator-with-api-751c2ec2b2e2?source=rss-dac21a031fb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/751c2ec2b2e2</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Jasna Fathim]]></dc:creator>
            <pubDate>Sat, 23 Aug 2025 15:14:08 GMT</pubDate>
            <atom:updated>2025-08-23T15:14:08.274Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wanted to build a fun little project to practice HTML, CSS, and JavaScript? <br>In this tutorial, we’ll create a Random Quote Generator that shows a new quote along with the author’s name every time you visit or click a button.</p><h4>Features</h4><ul><li>Displays random quotes automatically</li><li>Shows the author’s name</li><li>Responsive and minimal design</li></ul><h4>Technologies Used</h4><ol><li>HTML</li><li>CSS</li><li>JavaScript</li><li>DummyJSON Quotes API for fetching quotes</li></ol><p><strong>API Details</strong></p><p>I used the [DummyJSON Quotes API](<a href="https://dummyjson.com/quotes/random">https://dummyjson.com/quotes/random</a>) to fetch quotes.</p><p>Example request:</p><pre>&lt;script&gt;<br>    const quote=document.getElementById(&quot;quote&quot;);<br>    const author=document.getElementById(&quot;author&quot;);<br><br>    const api_url=&quot;https://dummyjson.com/quotes/random&quot;;<br>    async function getquote(url) {<br>    const response=await fetch(url);<br>    var data=await response.json();<br>    <br>     quote.innerHTML=data.quote;<br>     author.innerHTML=data.author;<br>                <br>    }<br>     getquote(api_url);<br><br>&lt;/script&gt;</pre><p>Example response:</p><pre>{<br>&quot;id&quot;:716,<br>&quot;quote&quot;:&quot;I am an ordinary man who worked hard to develop the talent I was given.&quot;,<br>&quot;author&quot;:&quot;Muhammad Ali&quot;<br>}</pre><h4>Live Demo</h4><p>V<a href="https://jasnafathim.github.io/Quote-Generator/">iew Live project</a></p><h4>Source Code</h4><p><a href="https://github.com/Jasnafathim/Quote-Generator">View on Github</a></p><h4>Screenshots</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGMpGhcSahBFViqZZYvPDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mAWDkqU29a6ptRMJpqyb8w.png" /></figure><h4>Connect with Me</h4><ul><li><a href="https://www.linkedin.com/in/jasnafathim/">LinkedIn</a></li><li><a href="https://github.com/Jasnafathim/">GitHub</a></li><li><a href="https://medium.com/@jasnafathim">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=751c2ec2b2e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>