<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Kasie Udoka Success</title>
    <description>The latest articles on Forem by Kasie Udoka Success (@udoka033).</description>
    <link>https://forem.com/udoka033</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1438636%2Fa42d6688-9fe6-4546-b074-6eac0e3f1d03.png</url>
      <title>Forem: Kasie Udoka Success</title>
      <link>https://forem.com/udoka033</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/udoka033"/>
    <language>en</language>
    <item>
      <title>Burnout to Breakthrough: Rediscovering My Passion in Tech and Writing</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Fri, 22 Nov 2024 20:19:48 +0000</pubDate>
      <link>https://forem.com/udoka033/burnout-to-breakthrough-rediscovering-my-passion-in-tech-and-writing-2hid</link>
      <guid>https://forem.com/udoka033/burnout-to-breakthrough-rediscovering-my-passion-in-tech-and-writing-2hid</guid>
      <description>&lt;p&gt;The past few months have been challenging. Every task felt daunting. Thinking about them alone drains my body and mind. I kept wondering, what was wrong with me? Am I sick? but got no answers.&lt;/p&gt;

&lt;p&gt;I felt exhausted mentally, emotionally, and physically. The tasks I used to sweep through felt like roadblocks. Am I getting depressed? I always asked myself. I was supposedly okay.&lt;/p&gt;

&lt;p&gt;I kept going, and sooner than I expected, I was caught up in the dark web of the non-medical condition that grazes the most passionate individuals; burnout.&lt;/p&gt;

&lt;p&gt;Burnout consumed me because I didn’t spot the signs early. I kept pushing through to build discipline but didn’t know when I fell off the cliff.&lt;/p&gt;

&lt;p&gt;What burned me out? Did I do anything specific that caused it? These questions kept creeping into my little head but I didn’t get the answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Costs of Burnout
&lt;/h2&gt;

&lt;p&gt;It started from losing interest in my hobbies, I was slowly not enjoying coding again, studying was like lifting a big rock, and even my very best friend; writing seemed far from me. I wanted to reconnect with her but I couldn’t.&lt;/p&gt;

&lt;p&gt;My system was full of drafts, and every attempt to start a project ended in frustration. A couple times, I got new project ideas that sparked my creativity but there was something I just couldn’t do; being productive.&lt;/p&gt;

&lt;p&gt;Days of unproductivity turned into weeks of sadness. I started disliking my tech skills, and school was becoming uninteresting.&lt;/p&gt;

&lt;p&gt;I was curious, how could something so tiny, so unrecognized have such a great impact and make me falter. A high-standard woman like me? Or is it age-related? I was confused. So I decided to go home.&lt;/p&gt;

&lt;p&gt;My clothes were roughly packed, and my essentials were hastily thrown into my laptop bag, then I headed home.&lt;/p&gt;

&lt;p&gt;At home, I couldn’t do anything meaningful I blankly stared at my ceiling all day. Sickness also amplified it. I was diagnosed with malaria, so it was a contributing factor. Though I felt better after treating the malaria, nothing changed in my mental state. I just wanted to travel this road alone and discover how to get out of this mess.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Path to Recovery
&lt;/h2&gt;

&lt;p&gt;I read articles, watched videos, and explored journals searching for how I could clear this menace and prevent myself from falling prey to its poisonous venom again.&lt;/p&gt;

&lt;p&gt;Everything I discovered was summarized in this article, &lt;a href="https://leaddev.com/culture/unseen-costs-burnout-tech-leadership" rel="noopener noreferrer"&gt;unseen costs of burnout in tech professionals&lt;/a&gt; (so this piece is not too long). It is not only for tech leads, it’s for everyone.&lt;/p&gt;

&lt;p&gt;The key changes I made were prioritizing rest, creating balance, timeboxing, and celebrating achievements. In between moments of practicing these, I stumbled on Nir Eyal’s &lt;a href="https://www.nirandfar.com/indistractable/" rel="noopener noreferrer"&gt;Indistractable&lt;/a&gt; and it was the absolute game changer.&lt;/p&gt;

&lt;p&gt;I learned how to manage my digital life even as a techie. It turns out I spend an unhealthy amount of time on my screen, whether studying, coding, or writing. I started journaling on paper, showing gratitude, and praying much longer.&lt;/p&gt;

&lt;p&gt;Slowly my passion started creeping in again, like the first rays of dawn after a long, dark night, and my spark was becoming more pronounced. In that moment of struggle, self-discovery happened: My passion, potential, and purpose.&lt;/p&gt;

&lt;p&gt;What can I do with no gains attached? What truly makes me happy even if no achievements are tied to it?&lt;/p&gt;

&lt;p&gt;Writing is the place I stay true to myself, without judgment or prejudice. She allows me to express my emotions, moods and thoughts.&lt;/p&gt;

&lt;p&gt;Writing is cathartic, perhaps that is why I love her. Whether one person or no person reads, it doesn’t matter. It feels like I’m building a time library where you can visit me, who I was, and remember how I felt without missing anything.&lt;/p&gt;

&lt;p&gt;My point is to find that one thing that truly inspires you and do it when you feel burned out. It can be a way of healing. And if a break is possible, please take it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lessons
&lt;/h2&gt;

&lt;p&gt;Take life easy; you can’t have everything figured out. If you don’t spot the signs of burnout early it will make more impact than you can imagine. When everything seems not to be working; tech, school, life; stick to that one thing that makes you feel authentic.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;I’m rediscovering my passions, and while I’m still on this journey, I’m hopeful. If you’re feeling lost, know that recovery is possible. Take it one step at a time; your spark will return. I hope this is a safe way of sliding back into your lives without any explanation for being away. Stay with me.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>career</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Implement Dark/Light Themes in Your Web Apps</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Thu, 18 Jul 2024 16:05:24 +0000</pubDate>
      <link>https://forem.com/udoka033/how-to-implement-darklight-themes-in-your-web-apps-2ah4</link>
      <guid>https://forem.com/udoka033/how-to-implement-darklight-themes-in-your-web-apps-2ah4</guid>
      <description>&lt;p&gt;Have you ever toggled between dark and light themes on a website and thought, "I wish my site could do that"? Well, now it can. In this article, I'll show you how to implement dark and light modes in your web projects using HTML, CSS, and JavaScript, giving your users the best visual experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite:&lt;/strong&gt; A basic understanding of HTML and CSS is required to comprehend this tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dark/light theme Implementation
&lt;/h2&gt;

&lt;p&gt;The key components of setting up a dark mode/light mode on websites are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A webpage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A button for switching between the themes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The theme or color to be switched &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The logic behind switching the theme and button text.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Webpage
&lt;/h2&gt;

&lt;p&gt;Set up your project&lt;/p&gt;

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

&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Virtual Tour App&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hero-sec"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Everyday Is a Journey&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Visit any Location Virtually, Anytime, Anywhere&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Tour&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"img.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"landscape"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"560px"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Output of plain web page&lt;/p&gt;

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

&lt;h2&gt;
  
  
  A Toggle Button
&lt;/h2&gt;

&lt;p&gt;It is important to add the theme toggle button. This is the button that triggers the change of color from light mode to dark mode and vice versa.&lt;/p&gt;

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

    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"toggle-button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Dark mode&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

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

&lt;h2&gt;
  
  
  Light/dark mode theme
&lt;/h2&gt;

&lt;p&gt;This is a crucial step because two themes or colors are involved here. We need a way to attach different styles to the web page with few lines of code. We will be using CSS variables for theming. Please read my article on &lt;a href="https://dev.to/udoka033/css-variables-css-custom-properties-for-beginners-3oha"&gt;CSS Variables&lt;/a&gt; if it sounds new to you .&lt;/p&gt;

&lt;p&gt;Step 1:&lt;br&gt;
Declare the style for the light theme&lt;/p&gt;

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

&lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fafaf3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0A0A0A&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;light&lt;/span&gt; &lt;span class="nt"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;default&lt;/span&gt; &lt;span class="nt"&gt;theme&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Step 2: &lt;br&gt;
Declare the class for the dark theme&lt;/p&gt;

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

&lt;span class="nc"&gt;.dark&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0A0A0A&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;class&lt;/span&gt; &lt;span class="nt"&gt;that&lt;/span&gt; &lt;span class="nt"&gt;will&lt;/span&gt; &lt;span class="nt"&gt;be&lt;/span&gt; &lt;span class="nt"&gt;added&lt;/span&gt; &lt;span class="nt"&gt;onclick&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Note: The variable names must be the same.&lt;/p&gt;

&lt;p&gt;This can be done without variables by using only the body element. However, it is better to use CSS variables because many occasions require more than the background color to be changed. Some web app theming requires changing text colors, border colors, shadows, etc. So using a variable allows full control of all elements, especially in large applications.&lt;/p&gt;

&lt;p&gt;Let's complete the styling of our web page. Ensure your CSS is linked to the HTML file.&lt;/p&gt;

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

&lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fafaf3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0A0A0A&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nt"&gt;This&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;light&lt;/span&gt; &lt;span class="nt"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;default&lt;/span&gt; &lt;span class="nt"&gt;theme&lt;/span&gt;
&lt;span class="nc"&gt;.dark&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0A0A0A&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--bg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;monospace&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.hero-sec&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;space-evenly&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.col1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#3f51b5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.hero-sec&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Output &lt;/p&gt;

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

&lt;h2&gt;
  
  
  The logic behind switching themes
&lt;/h2&gt;

&lt;p&gt;When a user clicks the toggle button, we expect two things to happen.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The theme or color mode of the website should change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The text on the button should change.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;To Change the theme&lt;/strong&gt;&lt;br&gt;
Manipulate the DOM (Document Object Model) to get the button and body of the web page. &lt;br&gt;
Declare a function to add "dark" class to the body element (which we already declared in the css).&lt;br&gt;
Call the function once a user clicks the dark/light mode button. Ensure your JS is linked to your HTML.&lt;/p&gt;

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

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toggleBtn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;toggle-button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;toggleTheme&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toggle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;toggleBtn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;toggleTheme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;To change the text&lt;br&gt;
Add another block of code to the toggleTheme function. This code simply means that &lt;em&gt;If&lt;/em&gt; the body contains the class "dark", toggle text to "Light mode" and vice versa.&lt;/p&gt;

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

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;toggleBtn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Light Mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;toggleBtn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Dark Mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;This can be done in one line for cleaner code.&lt;/p&gt;

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

 &lt;span class="nx"&gt;toggleBtn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Light Mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Dark Mode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Yes, You can switch themes now. Cool Right? Check the attached video for full demo.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;By following the steps outlined in this tutorial, you can provide your users with the flexibility to choose their preferred theme, making your web app more engaging and accessible.&lt;br&gt;
If you enjoyed my article you can &lt;a href="https://buymeacoffee.com/udoka_kasie" rel="noopener noreferrer"&gt; Buy Me A Coffee to Support my Work&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read my other articles on &lt;a href="https://dev.to/udoka033/progressive-web-apps-pwa-a-comprehensive-guide-57ii"&gt;Progressive Web Apps&lt;/a&gt;, &lt;a href="https://dev.to/udoka033/how-the-web-works-page-loading-and-beyond-4jd6"&gt;Innermost workings of the web&lt;/a&gt;, &lt;a href="https://dev.to/udoka033/css-variables-css-custom-properties-for-beginners-3oha"&gt;CSS Variables&lt;/a&gt;, &lt;a href="https://dev.to/udoka033/a-beginners-guide-to-front-end-development-4hjj"&gt;A Beginner's guide to front-end dev&lt;/a&gt; and &lt;a href="https://dev.to/udoka033"&gt;more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please Like, Comment, and Follow for more web-dev and tech-related articles. Happy Coding!!!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>css</category>
    </item>
    <item>
      <title>Progressive Web Apps (PWA): A Comprehensive Guide</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Sat, 06 Jul 2024 06:14:23 +0000</pubDate>
      <link>https://forem.com/udoka033/progressive-web-apps-pwa-a-comprehensive-guide-57ii</link>
      <guid>https://forem.com/udoka033/progressive-web-apps-pwa-a-comprehensive-guide-57ii</guid>
      <description>&lt;p&gt;Did you know that your web apps built with HTML, CSS, JavaScript, or any front-end framework can become installable, and work offline providing an enhanced user experience?&lt;/p&gt;

&lt;p&gt;This article will introduce progressive web apps to beginners, and anyone looking to improve their front-end development skills. In this article, you will learn;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Everything you need to start building Progressive Web Apps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to create installable web apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to implement offline functionality in Progressive Web Apps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to analyze web performance, accessibility, SEO, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tips for improving app performance, load time, and user experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite&lt;/strong&gt;: A basic knowledge of HTML and CSS is required for a full understanding of this article.&lt;/p&gt;

&lt;h2 id="intro"&gt;What is a Progressive Web App?&lt;/h2&gt;

&lt;p&gt;A Progressive Web App (PWA) is a type of web application that combines the best features of traditional websites and native mobile apps. PWAs are designed to be fast, reliable, and engaging, providing a native app-like experience on the web.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Progressive Web Apps?
&lt;/h2&gt;

&lt;p&gt;The benefits of PWA include but are not limited to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Performance:&lt;/strong&gt; PWAs load faster and perform better, which can enhance user experience and engagement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Offline Functionality:&lt;/strong&gt; With service workers, PWAs can cache web page content and function offline or in low-network conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Increased Engagement:&lt;/strong&gt; Push notifications, and home screen installation, without the hassle of going to the app store increase user engagement and experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SEO Friendly:&lt;/strong&gt; PWAs are discoverable by search engines, improving visibility and reach.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Safe:&lt;/strong&gt; They are served via HTTPS to prevent snooping and ensure content hasn't been tampered with.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Progressive Web App Examples
&lt;/h2&gt;

&lt;p&gt;Many big companies such as &lt;a href="https://www.youtube.com/" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;, &lt;a href="https://web.facebook.com/?_rdc=1&amp;amp;_rdr" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt;, and even &lt;a href="https://dev.to/"&gt;Dev.to&lt;/a&gt; made their web apps progressive (installable). If viewing from a mobile browser, click on the three dots at the top right corner, then click Install or add to the home screen. From a desktop, click on the install icon at the top right corner of your browser as in the image below.&lt;/p&gt;

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

&lt;h2 id="installable"&gt;How to Make Your Web Apps Installable&lt;/h2&gt;

&lt;p&gt;Whether you are building with Plain HTML, React, Vue, or any front-end framework, the steps of making your progressive web app installable are the same.&lt;br&gt;
This PWA tutorial will take you through the steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Set up your project.&lt;/p&gt;

&lt;p&gt;HTML&lt;/p&gt;

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


&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"style.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;PWA tutorial&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Recipe App&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;The best culinary treats&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Explore&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;CSS&lt;/p&gt;

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

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;aliceblue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.main&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;cadetblue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Franklin Gothic Medium'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'Arial Narrow'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;darkcyan&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.6rem&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Output&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Create a "Manifest.json" file. This step makes the app installable. The following details will make the splash screen of your application. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Recipe Application"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"short_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My Recipes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"A recipe application for creating awesome recipes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start_url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"theme_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#000000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"background_color"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#ffffff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"display"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"standalone"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"icons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./icon.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"sizes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"192x192"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"image/png"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;Step 3- Link this manifest file to your HTML.&lt;/p&gt;

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

    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"manifest"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"manifest.json"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;  


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

&lt;/div&gt;

&lt;p&gt;Voila! your app is installable &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Splash screen&lt;/strong&gt; &lt;br&gt;
This is the first screen that is displayed when the app is visited.&lt;/p&gt;

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

&lt;h2 id="offline"&gt;Implementing Offline Feature in Progressive Web Apps&lt;/h2&gt;

&lt;p&gt;Offline capabilities in Progressive Web Apps enhance user experience. It ensures users enjoy the app with or without an internet connection. This is possible through service workers, background sync, &lt;a href="https://www.cloudflare.com/learning/cdn/what-is-caching/" rel="noopener noreferrer"&gt;Caching&lt;/a&gt;, etc.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" rel="noopener noreferrer"&gt;service worker (SW)&lt;/a&gt; intercepts network requests and gives responses from the cache when internet connection is not available.&lt;br&gt;
While making your PWA offline, you can code the service worker manually or utilize tools like Workbox, &lt;a href="https://www.pwabuilder.com/" rel="noopener noreferrer"&gt;PWA Builder Online&lt;/a&gt;, PWA Studio, etc. &lt;br&gt;
For this tutorial, &lt;a href="https://developer.chrome.com/docs/workbox" rel="noopener noreferrer"&gt;Workbox&lt;/a&gt;, owned by Google is the library of choice because it offers comprehensive features like precaching, background sync, push notifications, ease of use, etc. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to Integrate Workbox for Offline Functionality
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Install Workbox on the command line &lt;br&gt;
Using "npx" ensures the latest version is always installed. If you are building with React.js, run "npm run build" before this step to generate a build folder (contains static files ready for deployment). &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;npx workbox wizard&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Answer questions prompts from the Workbox wizard as in the image below.&lt;br&gt;
For React.js projects, the &lt;strong&gt;build&lt;/strong&gt; folder should serve as the root of the application.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Generate the Service Worker file&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;npx workbox generateSW workbox-config.js&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib6mqyii8pmr3dho8fgr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fib6mqyii8pmr3dho8fgr.png" alt="service worker for pwa"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Paste this script code into your index.js file to register the SW. Ensure it is linked to your HTML document.&lt;/p&gt;

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

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;serviceWorker&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;load&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;serviceWorker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/sw.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Deploy &lt;br&gt;
Service workers require https:// to ensure security. Deploy the project to &lt;a href="https://app.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt;, or &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;. View the web app on the browser.&lt;/p&gt;

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

&lt;h2 id="lighthouse"&gt;How to Analyze Web App Performance, Accessibility, and SEO &lt;/h2&gt;

&lt;p&gt;Chrome &lt;a href="https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt; is a powerful tool for this analysis. Analyzing web performance, accessibility, and SEO is crucial for building high-quality web apps that provide excellent user experience.&lt;br&gt;
To perform this analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open Chrome dev tools by right-clicking on your webpage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on Inspect, then navigate to Lighthouse tab&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the tab click on mobile or desktop based on preference&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate Report&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Check Lighthouse Score&lt;/li&gt;
&lt;/ul&gt;


&lt;h2 id="tips"&gt;Best Practices for PWA Performance Optimization&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Preload URLs and fonts that can slow the loading process of PWA.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement Lazy Loading to defer the loading of assets like images until they are needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure clean code architecture&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove unwanted code and spaces to improve the overall performance of PWA.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  In Summary,
&lt;/h2&gt;

&lt;p&gt;PWAs are web apps that give a native-app-like experience. From offline functionality to installation prompts. From background sync to push notifications, the list is endless.&lt;br&gt;
Building a progressive web app is an interesting yet challenging feat, but with constant practice and attention to detail, the best user satisfaction is yet to be delivered.&lt;/p&gt;

&lt;p&gt;Thank you for reading. Like and follow for more web development and tech-related articles. &lt;a href="https://buymeacoffee.com/udoka_kasie" rel="noopener noreferrer"&gt; Buy Me A Coffee to Support my Work&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>CSS Variables (CSS Custom properties) for Beginners</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Tue, 18 Jun 2024 20:40:32 +0000</pubDate>
      <link>https://forem.com/udoka033/css-variables-css-custom-properties-for-beginners-3oha</link>
      <guid>https://forem.com/udoka033/css-variables-css-custom-properties-for-beginners-3oha</guid>
      <description>&lt;p&gt;In our projects, we often encounter repetitive values such as width, color, font, etc. These values can lead to redundancy in our work and make it difficult to change on large projects.&lt;br&gt;
This guide explains CSS variables also known as CSS custom properties in a beginner-friendly manner and a step-by-step guide for changing CSS values using JavaScript when a user performs an action such as a click.&lt;/p&gt;

&lt;p&gt;By implementing CSS Variables, you can streamline your design process and improve the efficiency of your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite:&lt;/strong&gt; A basic knowledge of HTML, and CSS is required to comprehend this article.&lt;/p&gt;
&lt;h2&gt;
  
  
  What are CSS Variables?
&lt;/h2&gt;

&lt;p&gt;You may be wondering if "variables" exist in CSS(Cascading Style Sheets) as it does in programming languages, and the answer is "yes". CSS variables also known as CSS custom properties are entities defined by CSS authors that express certain values to be reused across the components.&lt;/p&gt;

&lt;p&gt;This means that CSS provides you with a tiny storage of value that can be referenced as many times as possible within your project.&lt;/p&gt;
&lt;h3&gt;
  
  
  Let's break this down,
&lt;/h3&gt;

&lt;p&gt;Imagine two people working on a project that requires changing a brand color from red to green. Person1 edits the color on all elements in the project to green, while Person2 simply changes the CSS value on their variable to green and everything works just fine. Would you rather be Person1 or Person2?&lt;/p&gt;
&lt;h2&gt;
  
  
  Benefits of Using CSS Variables
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Improves the readability and semantics of code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes changing repetitive values a lot easier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Easy update of values dynamically using JavaScript, offering flexibility in response to user actions or clicks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3nvcw74sgs5oytzkwko5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3nvcw74sgs5oytzkwko5.jpg" alt="Image of HTML code" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Declare CSS Variables
&lt;/h2&gt;

&lt;p&gt;CSS variables can be declared using two dashes as a prefix for the CSS style property name, and any valid CSS value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--variable-name: value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can be declared locally or globally depending on your specific need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local declaration&lt;/strong&gt; means declaring the variable inside a CSS selector and, hence can only be accessed inside that scope.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* this is a local declaration*/
header{
--brand-color: red
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Global declaration&lt;/strong&gt; is done using &lt;em&gt;:root&lt;/em&gt; pseudo-class. This makes the variable accessible globally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* this is a global declaration*/
:root{
--brand-color: red
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡Note: CSS variable names are case-sensitive hence primary-Color and primary-color are not the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Access CSS Variables
&lt;/h2&gt;

&lt;p&gt;CSS variables are accessed using the var() function.&lt;br&gt;
&lt;/p&gt;

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

property: var(--variableName)

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to Change CSS Variables Using JavaScript
&lt;/h2&gt;

&lt;p&gt;This is helpful when there is a need to change some values when a user performs a particular action. For example, when a user should select fonts, colors, and themes on your website.&lt;/p&gt;

&lt;p&gt;To change CSS values based on the user's actions, you have to take the following steps;&lt;/p&gt;

&lt;p&gt;Step 1: Setup Your HTML&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;link rel="stylesheet" href="./style.css"&amp;gt;
    &amp;lt;script src="./app.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;Hello There&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;
        &amp;lt;button id="button" onclick="handleClick()"&amp;gt;Change Color here&amp;lt;/button&amp;gt;
    &amp;lt;/header&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Style your CSS;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:root{
    --primary-color: blue;
}
h1{
    color: var(--primary-color)
}
p{
    background-color: var(--primary-color);
}
button{
    border: 5px solid var(--primary-color)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fta5ngm0plocreosz0t6q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fta5ngm0plocreosz0t6q.png" alt="image of css variables" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: JavaScript;&lt;br&gt;
Manipulate the DOM (Document Object Model) and get the CSS selectors. e.g :root&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const changeButton = document.getElementById('button')
const root = document.querySelector(':root')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a function for handling the click event.&lt;br&gt;
In the function, change the root value by using the "setProperty" method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function handleClick(event) {
root.style.setProperty('--primary-color', 'green')
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Script.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const changeButton = document.getElementById('button')
const root = document.querySelector(':root')
function handleClick(event) {
root.style.setProperty('--primary-color', 'green')
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output after click&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo167k6zpgbpobos2pjlj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo167k6zpgbpobos2pjlj.png" alt="Image of changing css variables with JavaScript" width="734" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;This method works perfectly with any CSS value such as fonts, width, colors, etc.&lt;br&gt;
To read more on CSS Style Properties please visit &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please check out my other articles on &lt;a href="https://dev.to/udoka033/a-beginners-guide-to-front-end-development-4hjj"&gt;Front-end development&lt;/a&gt;, &lt;a href="https://dev.to/udoka033/how-the-web-works-page-loading-and-beyond-4jd6"&gt;Innermost workings of the web&lt;/a&gt; and &lt;a href="https://dev.to/udoka033/overcoming-imposter-syndrome-as-a-beginner-in-tech-20f0"&gt;How to overcome impostor syndrome in tech &lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please like, comment and follow for more web development, and tech-related articles.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Overcoming Imposter Syndrome as a Beginner in Tech</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Sun, 16 Jun 2024 22:38:34 +0000</pubDate>
      <link>https://forem.com/udoka033/overcoming-imposter-syndrome-as-a-beginner-in-tech-20f0</link>
      <guid>https://forem.com/udoka033/overcoming-imposter-syndrome-as-a-beginner-in-tech-20f0</guid>
      <description>&lt;p&gt;In this realm of technology, where innovation and expertise thrive, many of us have faced a nagging sense of inadequacy at some point in our journey. It’s a phenomenon known as imposter syndrome. &lt;/p&gt;

&lt;h2&gt;
  
  
  Imposter Syndrome meaning
&lt;/h2&gt;

&lt;p&gt;A persistent feeling that despite our accomplishments, we don’t truly belong, our successes are merely flukes, and any recognition we receive is undeserved.&lt;/p&gt;

&lt;p&gt;Have you ever found yourself questioning your abilities, doubting whether you’re truly cut out for the tech world? Have you downplayed your achievements, attributing them to luck rather than skill and hard work? If so, you’re not alone. In this article, I will share my personal experience, insights, and strategies for overcoming these self-limiting beliefs as a beginner in tech.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Story
&lt;/h2&gt;

&lt;p&gt;Transitioning from a non-tech background to &lt;a href="https://dev.to/udoka033/a-beginners-guide-to-front-end-development-4hjj"&gt;front-end development&lt;/a&gt; was not an easy feat. It was filled with fear, self-doubt, feelings of inadequacy, and intimidation. There were so many concepts and technologies to learn, and varying roadmaps to follow.&lt;/p&gt;

&lt;p&gt;I was so confused until a friend gave me an Udemy course by &lt;a href="https://www.udemy.com/user/coltsteele/" rel="noopener noreferrer"&gt;Colt Steele&lt;/a&gt; which built a strong foundation for my front-end coding. I not only gained valuable skills but also built beginner projects. I was doing okay except that I didn't feel it internally. My projects were getting interesting, and my skills sharpening but I wasn't acknowledging them and that was imposter syndrome.&lt;/p&gt;

&lt;p&gt;Every line of code seemed like a potential mistake, and every project was completed like a stroke of luck. Every tiny bug made me doubt myself, so I had to look for a way out. They were major issues I started having when I developed this "fraud" syndrome as referred to by &lt;a href="https://www.ncbi.nlm.nih.gov/books/NBK585058/" rel="noopener noreferrer"&gt;National Institute of Health&lt;/a&gt;, these issues will be explained in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consequences of Imposter Syndrome
&lt;/h2&gt;

&lt;p&gt;Low Confidence level: This is a common tech-industry challenge for newbies. The continuous self-doubt associated with impostor syndrome leads to decreased self-confidence and reluctance to take on new challenges.&lt;/p&gt;

&lt;p&gt;Fear of Failure: There's often an excessive fear of making mistakes with imposters in tech and any other field. This occurs due to perfectionism. Most people experiencing imposter syndrome usually want everything to be perfect. It is okay to strive for excellence but that should focus on the overall outcome rather than the "how".&lt;/p&gt;

&lt;p&gt;Procrastination: This is a product of fear, and might lead to delays of tasks, and general weakness.&lt;/p&gt;

&lt;p&gt;Stress and Anxiety: Continuous worry about being exposed as a fraud can lead to heightened stress levels.&lt;/p&gt;

&lt;p&gt;Career Stagnation: Avoiding opportunities for advancement due to feeling undeserving or unqualified.&lt;/p&gt;

&lt;p&gt;Burnout: Overworking to prove oneself can lead to burnout and health breakdown.&lt;/p&gt;

&lt;p&gt;Isolation: This occurs when a person keeps believing that others are more competent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Overcome Imposter Syndrome
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn to celebrate your little efforts&lt;/strong&gt;&lt;br&gt;
This might seem insignificant but try to appreciate your success no matter how little. Appreciate that concept learned, that tutorial video you finished, that project you led, and that post you shared because they play an integral role in building &lt;a href="https://dictionary.cambridge.org/dictionary/english/confidence" rel="noopener noreferrer"&gt;confidence&lt;/a&gt; in your tech skills. Understand that every success brings you steps closer to that future you envisage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Practice Learned Optimism:&lt;/strong&gt;&lt;br&gt;
People who believe that bad events have specific causes are more optimistic. I gained this insight from Martin Seligman's &lt;a href="https://positivepsychology.com/learned-optimism/" rel="noopener noreferrer"&gt;Learned Optimism book&lt;/a&gt;. Practicing optimism means looking at your mistakes and imperfections in a new light. This optimistic style of explaining good events internally increases self-esteem. This doesn't mean you shouldn't take responsibility for your actions but you should acknowledge your strengths and work towards developing them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Have a Growth Mindset&lt;/strong&gt;&lt;br&gt;
A growth mindset involves the belief that skills and intelligence can be enhanced through persistent effort and determination.&lt;br&gt;
This is another crucial coping strategy for imposter syndrome. Instead of viewing challenges as threats to competence, see them as opportunities to learn and improve. When faced with complex tasks, approach them with curiosity and a willingness to learn, rather than fear of failure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collaborate and Seek Feedback&lt;/strong&gt;&lt;br&gt;
Instead of viewing team members as competition, collaborate with them and improve your skillset. Seek feedback and work on them. Use feedback to improve your skills rather than viewing it as a reflection of your ability. Feedback is invaluable in personal and professional growth as it helps build mental resilience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Show Your Work&lt;/strong&gt;&lt;br&gt;
You don't have to be a genius. Be an amateur. Amateurs are not afraid to make mistakes in public. Even as a professional, the best way to flourish is to retain an amateur spirit and embrace uncertainty. These words from Austin Kleon in his book &lt;a href="https://pdfcoffee.com/show-your-work-pdf-free.html" rel="noopener noreferrer"&gt;Show Your Work&lt;/a&gt; stood out for me the most.&lt;br&gt;
It is important to share that mini-project, that small milestone reached, that video edited. Learn to share the process, not only products. This way you can overcome perfectionism, and improve your self-belief as a tech professional.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One Final Note
&lt;/h2&gt;

&lt;p&gt;Always strive for success despite imposter syndrome. Overcoming self-doubt in tech might be difficult but with constant practice, the process gets easier. &lt;br&gt;
Celebrate your small achievements, practice optimism, develop a growth mindset, collaborate and seek feedback, and finally show your work.&lt;br&gt;
Imposter syndrome can be different for everyone but this is my personal experience, research, and insights. &lt;/p&gt;

&lt;p&gt;Please share how you overcame imposter syndrome in your career, work, or school in the comment section. Please like, comment, and follow for more web development and tech-related topics.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How the web works: page loading and beyond</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Wed, 08 May 2024 01:55:52 +0000</pubDate>
      <link>https://forem.com/udoka033/how-the-web-works-page-loading-and-beyond-4jd6</link>
      <guid>https://forem.com/udoka033/how-the-web-works-page-loading-and-beyond-4jd6</guid>
      <description>&lt;p&gt;Have you ever wondered what happens behind the scenes before a website loads? It's a question that piques the curiosity of many internet users, and for good reason. Understanding the intricate processes in the moments leading up to the webpage display can unlock a deeper appreciation for the web's inner workings.&lt;/p&gt;

&lt;p&gt;But the significance of this knowledge extends beyond mere curiosity. For users, it provides insights on navigating the web effectively and making informed choices about online interactions. For developers, it lays the foundation for building robust and maintainable web applications that deliver seamless user experiences.&lt;/p&gt;

&lt;p&gt;In this article, we'll dive into the dynamics of the web, breaking down complex processes occurring behind the scenes.&lt;/p&gt;

&lt;p&gt;Whether you're a curious user seeking to understand more about technology or a developer looking to enhance your web development skills, this article will provide a vivid and simplified explanation of the inner workings of the web.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Architecture Overview
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkj27av76gswy9vx93be.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkj27av76gswy9vx93be.jpg" alt="Image of people working on the web" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The web is known as the World Wide Web in full. The web is a vast network of interconnected documents and resources that can be accessed over the Internet. &lt;br&gt;
So the &lt;em&gt;internet helps us access the web.&lt;/em&gt; The internet allows data to be transmitted across far distances via wireless technologies.&lt;/p&gt;

&lt;p&gt;The basic architecture is the client-server model. The user's device serves as the client, whereas the server is an interconnection of software.&lt;/p&gt;

&lt;p&gt;This architecture allows for separate concerns, where clients handle user interfaces, while servers manage data storage and processing.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Web Page Loading Process
&lt;/h3&gt;

&lt;p&gt;The page load process is a basic aspect of web browsing, which envelops a &lt;em&gt;sequence of actions that occur when a user requests and accesses a web page.&lt;/em&gt;&lt;br&gt;
This website &lt;a href="https://dev.to/"&gt;dev. to&lt;/a&gt; is displaying to you because of some intricate actions occurring over the web.&lt;/p&gt;

&lt;p&gt;You can view this page because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You have a browser;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;you are connected to the internet &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;and this website lives on a server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's have a brief definition of some terms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser:&lt;/strong&gt; a software application used to access and view information on the web. They interpret the content received from servers and render it into a visual format that users can interact with. e.g. Chrome, Safari, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Server:&lt;/strong&gt; Servers are software applications responsible for serving content to clients. They receive incoming requests, process them, and send back responses containing the requested resources. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IP address:&lt;/strong&gt; It is a unique identifier for the client device, allowing data packets to be sent across the internet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DNS:&lt;/strong&gt; Domain Name System is like a book that contains the server's IP address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTTP:&lt;/strong&gt; stands for Hypertext Transfer Protocol. It is a protocol that defines how messages are transmitted over the web. It is like the language that clients and servers communicate with.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Here's how it works:
&lt;/h4&gt;

&lt;p&gt;When a client enters a site URL(Universal Resource Locator) on their browser,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The browser goes to the DNS and gets the real address(IP address)to the website server,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the browser then sends an HTTP Request to that server, to retrieve a copy of the website,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The server processes this request and sends a copy of the website as data packets to the browser. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the browser then parses the data packets, to display the text, images, etc. that you see on the web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The browser parses the HTML(structure) first. Followed by the CSS, and JavaScript DOM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This is when a user sees a nice visual representation of page content to interact with.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysbtreb7oo8dj6e4fjz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysbtreb7oo8dj6e4fjz.jpg" alt="laptop image of html parsing" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  How HTTPS (Hypertext Transfer Protocol Secure) Secures Web
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Communication.
&lt;/h4&gt;

&lt;p&gt;is an extension of HTTP that uses encryption protocols to secure data over the internet.&lt;/p&gt;

&lt;p&gt;Encryption is the process of encoding data transmitted between clients to prevent unauthorized access without an encryption key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.techtarget.com/searchsecurity/definition/encryption" rel="noopener noreferrer"&gt;Tech Target&lt;/a&gt; says that encryption is the method by which information is converted into secret code that hides the information's true meaning.&lt;/p&gt;

&lt;p&gt;HTTPS through complex processes outside the scope of this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ensures Confidentiality &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instills trust and confidence&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensures data integrity by avoiding modification.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Conclusion, &lt;br&gt;
For a web page to display on a screen, these actions must take place to ensure user experience and security.&lt;br&gt;
For a recap; when a URL is sent from a client's browser to the server, a copy of the website is retrieved and parsed by the browser to be displayed as a web page. &lt;/p&gt;

&lt;p&gt;Web architecture may be difficult to grasp as a beginner but with time, everything gradually opens up.&lt;br&gt;
For further details on the innermost workings of the web, you can  visit &lt;a href="https://developer.mozilla.org/en-US/" rel="noopener noreferrer"&gt;mozilla developer network&lt;/a&gt; or &lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;w3.schools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please like, comment, and follow for more web development-related content.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>javascript</category>
    </item>
    <item>
      <title>A Beginner's Guide to Front-End Development</title>
      <dc:creator>Kasie Udoka Success</dc:creator>
      <pubDate>Sat, 04 May 2024 20:09:59 +0000</pubDate>
      <link>https://forem.com/udoka033/a-beginners-guide-to-front-end-development-4hjj</link>
      <guid>https://forem.com/udoka033/a-beginners-guide-to-front-end-development-4hjj</guid>
      <description>&lt;p&gt;Front-end development refers to creating the visual and interactive aspects of websites and web applications that users directly interact with. It is a good choice for a long-term career change, or a side business, as it requires a low barrier to entry. &lt;br&gt;
Before we dive into the steps, it is important to understand what front-end development is all about, and what front-end developers do.&lt;/p&gt;

&lt;p&gt;This article is completely beginner-friendly and doesn't require any prior knowledge of coding.&lt;/p&gt;

&lt;p&gt;A front-end developer is a programmer who focuses on a website or web application's user interface and user experience. &lt;/p&gt;

&lt;h2&gt;
  
  
  Roles of a Front-End Developer
&lt;/h2&gt;

&lt;p&gt;Front-end developers form an integral part of the web development process. Specializing in crafting and refining client-side interfaces for applications and websites.&lt;br&gt;
They are responsible for a variety of important tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User Interface Design Implementation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamic functionalities and interactivity of websites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensuring Responsiveness across devices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance optimization&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Version Control&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cross-browser Compatibility testing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  User Interface Design Implementation:
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffev5pnb2psbkj3baxcz8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffev5pnb2psbkj3baxcz8.png" alt="sample coaching website"&gt;&lt;/a&gt;&lt;br&gt;
Front-end Development involves crafting visually captivating interfaces through code. It involves implementing designs that align with brand objectives. This is done with a thorough understanding of front-end design.&lt;/p&gt;

&lt;h4&gt;
  
  
  Dynamic functionalities and interactivity of websites.
&lt;/h4&gt;

&lt;p&gt;Functionalities such as button clicks are achieved in front-end coding. This ensures a smooth and seamless experience for users by optimizing the usability and accessibility of the interface&lt;/p&gt;

&lt;h4&gt;
  
  
  Ensuring Responsiveness across devices.
&lt;/h4&gt;

&lt;p&gt;According to &lt;a href="https://explodingtopics.com/blog/mobile-internet-traffic" rel="noopener noreferrer"&gt;Exploding Topics&lt;/a&gt;, Over 60% of website traffic comes from mobile devices. This entails that developers should ensure responsiveness on almost all devices. Responsiveness across devices is an essential role of front-end developers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Performance Optimization.
&lt;/h4&gt;

&lt;p&gt;This is achieved by optimizing code, minimizing image size, and caching during development.&lt;/p&gt;

&lt;h4&gt;
  
  
  Version Control
&lt;/h4&gt;

&lt;p&gt;Versioning helps developers to track changes in their projects. It helps in branch management, codebase maintenance, and documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cross browser compatibility
&lt;/h4&gt;

&lt;p&gt;Front-end developers play significant roles in ensuring websites and web applications function consistently across browsers. &lt;/p&gt;

&lt;h2&gt;
  
  
  Essential Front End Technologies.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript frameworks/libraries &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS frameworks/libraries&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  HTML (Hypertext Markup Language):
&lt;/h4&gt;

&lt;p&gt;HTML is the standard markup language for creating the structure and content of web pages. It defines the elements and layout of a webpage, such as headings, paragraphs, images, and links. &lt;/p&gt;

&lt;h4&gt;
  
  
  CSS (Cascading Style Sheets):
&lt;/h4&gt;

&lt;p&gt;CSS is used to style the appearance of HTML elements on a webpage. It allows developers to define colors, fonts, layouts, and other visual aspects to create appealing and responsive designs.&lt;/p&gt;

&lt;h4&gt;
  
  
  JavaScript:
&lt;/h4&gt;

&lt;p&gt;JavaScript is a programming language that allows web pages to have dynamic and interactive features.&lt;br&gt;
It is used for tasks such as; button clicking and creating interactive features like sliders, carousels, and animations.&lt;/p&gt;

&lt;h4&gt;
  
  
  Git:
&lt;/h4&gt;

&lt;p&gt;Version control systems like Git are essential tools for managing code changes, collaboration among developers, and tracking project history. &lt;/p&gt;

&lt;h4&gt;
  
  
  JavaScript libraries and frameworks:
&lt;/h4&gt;

&lt;p&gt;This includes React.js, Vue.js, Angular, and Svelte which are used to build dynamic and interactive user interfaces for web applications. They provide reusable components, and capabilities to enhance development efficiency and maintainability.&lt;/p&gt;

&lt;h4&gt;
  
  
  CSS frameworks:
&lt;/h4&gt;

&lt;p&gt;CSS frameworks such as Bootstrap, Tailwind CSS, and so on provide pre-designed styles and components to streamline the process of building responsive and visually consistent web layouts&lt;/p&gt;

&lt;h2&gt;
  
  
  How to become a front-end developer in 2024
&lt;/h2&gt;

&lt;p&gt;You can become a front-end developer by enrolling in a boot camp or taking self-paced courses.&lt;br&gt;
I recommend taking free courses on &lt;a href="https://www.freecodecamp.org/" rel="noopener noreferrer"&gt;FreeCodeCamp&lt;/a&gt; to learn the basics.&lt;br&gt;
Here's my advice for anyone looking to start front-end&lt;br&gt;
development in 2024;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Start by learning how the web works, and understand the core concepts of web development&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn HTML basics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Style your web pages using CSS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build simple static websites &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn JavaScript concepts such as variables, DOM, events, loops, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add functionalities to your styled pages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn version control and push your projects to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;Github&lt;/a&gt;, an open-source version control software that lets multiple people make separate changes to web pages at the same time&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always google any issues you encounter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn a CSS framework, and use it for building projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose a JavaScript library or framework of choice and start learning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Join any developers community like &lt;a href="https://dev.to/"&gt;dev. to&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Practice Practice Practice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;Hone your skills. Start by structuring with HTML, styling with CSS, and interactivity with JavaScript. Use Git for version control and push your projects to GitHub for collaboration. &lt;br&gt;
Front-end development might be overwhelming but you can master it by practicing consistently. &lt;/p&gt;

&lt;p&gt;Please like, comment, and follow for more web development-related content.&lt;/p&gt;

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