<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Israel Rotimi</title>
    <description>The latest articles on DEV Community by Israel Rotimi (@israelrotimi).</description>
    <link>https://dev.to/israelrotimi</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%2F1225975%2F607d8339-dd70-4620-9958-02e4622f8300.png</url>
      <title>DEV Community: Israel Rotimi</title>
      <link>https://dev.to/israelrotimi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/israelrotimi"/>
    <language>en</language>
    <item>
      <title>New devs with real projects — are you struggling to get hired too?</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Tue, 17 Feb 2026 01:42:48 +0000</pubDate>
      <link>https://dev.to/israelrotimi/new-devs-with-real-projects-are-you-struggling-to-get-hired-too-4544</link>
      <guid>https://dev.to/israelrotimi/new-devs-with-real-projects-are-you-struggling-to-get-hired-too-4544</guid>
      <description>&lt;p&gt;I’m curious how others are experiencing the entry-level dev market right now.&lt;/p&gt;

&lt;p&gt;I’ve put real effort into learning &amp;amp; building a couple production-ready projects — not just tutorials, but things I've shipped. I thought that would move me closer to being “job ready,” yet applications still seem to go nowhere.&lt;/p&gt;

&lt;p&gt;So I want to compare notes:&lt;/p&gt;

&lt;p&gt;If you’re a newer developer with solid projects, are you also struggling to get hired? What feedback (if any) are you getting? Do you feel the bar has moved, or are we missing something important?&lt;/p&gt;

&lt;p&gt;Would genuinely like to hear what others are seeing.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>My Debut as a Backend Developer: How I deployed a URL Shortener API</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Thu, 19 Jun 2025 10:52:32 +0000</pubDate>
      <link>https://dev.to/israelrotimi/my-debut-as-a-backend-developer-how-i-deployed-a-url-shortener-api-193c</link>
      <guid>https://dev.to/israelrotimi/my-debut-as-a-backend-developer-how-i-deployed-a-url-shortener-api-193c</guid>
      <description>&lt;p&gt;Hey there, nice to talk about my dev journey again.&lt;br&gt;
I've been a frontend developer for majority of my career, even though I learned Node.js early on I had not fully dived in and deployed a fully functional project end-to-end - until now.&lt;br&gt;
Here's I explain what it was like, what I faced and how I built it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The challenge
&lt;/h2&gt;

&lt;p&gt;I searched online for backend projects to build and took the the basic overview they gave as a starting point.&lt;br&gt;
I was to build a URL Shortener service where a long URL can be sent to the server and a shortened URL returned. I was to create a catch-all route that would intercept the requests from a shortened URL search for it's matching long URl and redirect to it. Simple Right? Not really.&lt;/p&gt;
&lt;h2&gt;
  
  
  My solution
&lt;/h2&gt;

&lt;p&gt;So, I Started building. I set up basic app stucture, then I stopped taught long and hard and came up with this solution.&lt;/p&gt;

&lt;p&gt;I'll only need one database model or Schema, since there'll be no auth in the app.&lt;br&gt;
 I would&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;retrieve the long URL from the request&lt;/li&gt;
&lt;li&gt;store it in the DB Schema&lt;/li&gt;
&lt;li&gt;generate a unique ID for the URL&lt;/li&gt;
&lt;li&gt;And store that simultaneously with the longer URL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I figured that generating a unique ID was a simpler solution I could implement rather than actually performing operations on the original string as that would be entering the realm of Cryptography. &lt;/p&gt;

&lt;p&gt;I used AI to come up with a solution to generate a unique string and it came up with a simple solution that would work just fine until my app had many users and was used many times a day.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="nx"&gt;shortenedStringId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// This implementation can generate approx. 56.8 billion unique strings.&lt;/span&gt;
        &lt;span class="c1"&gt;// That'll be okay for now, but if you want to use in production&lt;/span&gt;
        &lt;span class="c1"&gt;// Consider installing a package like nanoid to generate unique strings&lt;/span&gt;
        &lt;span class="c1"&gt;// or consider implementing a more robust solution.&lt;/span&gt;
        &lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;chars&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;charAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;chars&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&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;h2&gt;
  
  
  Challenges I faced
&lt;/h2&gt;

&lt;p&gt;I faced some real challenges when I tested what I built. But thanks to a robust error management system I put in place, an error middleware, I could pinpoint were the error was coming from.&lt;br&gt;
I fixed a few import errors but couldn't pinpoint one bug. &lt;br&gt;
Finally I placed it in Chatgpt and asked it if it was valid. &lt;br&gt;
I turned out to be a subtle error were I forgot to destructure the URL from &lt;code&gt;req.params&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//My previous code&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&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="c1"&gt;// LLM corrected&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This emphasizes how a fresh pair of eyes sometimes could spot what you didn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;Building this App taught me debugging as a backend developer and increased my confidence in handling problems.&lt;br&gt;
In returning the shortened URL, I wasn't sure of the live URL so I used &lt;code&gt;req.baseUrl&lt;/code&gt; but that didn't work as expected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;originalURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;newUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetURL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;shortURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;newUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shortenedStringId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;I don't know a better solution, if you know a better solution, please mention in the comments.&lt;/p&gt;

&lt;p&gt;Check out the GitHub repo at &lt;a href="https://github.com/israelrotimi/url-shortener" rel="noopener noreferrer"&gt;https://github.com/israelrotimi/url-shortener&lt;/a&gt;&lt;br&gt;
And please leave a star ⭐&lt;/p&gt;

&lt;p&gt;It's deployed on render &lt;a href="https://url-shortener-api-o0n2.onrender.com/" rel="noopener noreferrer"&gt;https://url-shortener-api-o0n2.onrender.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>backend</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Make an interactive drum using the HTML Audio API</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Mon, 05 May 2025 07:43:35 +0000</pubDate>
      <link>https://dev.to/israelrotimi/make-an-interactive-drum-using-the-html-audio-api-26mp</link>
      <guid>https://dev.to/israelrotimi/make-an-interactive-drum-using-the-html-audio-api-26mp</guid>
      <description>&lt;p&gt;In this article, you'll learn about the HTML Audio API and make a fun project too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Basic knowledge of HTML, CSS and JavaScript is required.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Audio API
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Audio&lt;/code&gt;API is part of the &lt;code&gt;HTMLMediaElement&lt;/code&gt;according to &lt;a href="https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Client-side_APIs/Video_and_audio_APIs" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;, which is an interface that enables to use multimedia in our web applications.&lt;/p&gt;

&lt;p&gt;It gives us various methods that enable us to programmatically interact with audio in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  API methods
&lt;/h2&gt;

&lt;p&gt;You can create the audio element in HTML&lt;br&gt;
&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;audio&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"noise"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"noise.mp3"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"audio/mpeg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/audio&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And access it using JavaScript.&lt;br&gt;
You can also create it dynamically using the &lt;code&gt;Audio&lt;/code&gt; object&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;noise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/path/to/some/noise.mp3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It takes the path to the audio file as a parameter&lt;/p&gt;

&lt;p&gt;Some of the methods you can use are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Audio.play() - plays the audio.&lt;/li&gt;
&lt;li&gt;Audio.pause() - pauses a playing sound.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Events on the audio element:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;canplaythrough&lt;/code&gt; - Fired when the media resource is fully loaded. &lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;pause&lt;/code&gt;- Fired when Playback has been paused.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;play&lt;/code&gt; - Fired when Playback has begun&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;playing&lt;/code&gt;- Playback is ready to start after having been paused or delayed due to lack of data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a complete list check &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/audio" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical: Building an interactive drum
&lt;/h2&gt;

&lt;p&gt;We will build an interactive drum with HTML, CSS and JavaScript.&lt;/p&gt;

&lt;p&gt;First you'll need drum sounds.  A Google search should give you promising results.&lt;/p&gt;

&lt;p&gt;Get single beat sounds so you can implement different drums.&lt;/p&gt;

&lt;p&gt;I'll be using 4 drum sounds.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tribal-dry-drum&lt;/li&gt;
&lt;li&gt;hand-tribal-drum&lt;/li&gt;
&lt;li&gt;hard-horror-drum&lt;/li&gt;
&lt;li&gt;short-bass-hit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I got them from MixKit.&lt;br&gt;
They are all in &lt;code&gt;.wav&lt;/code&gt;format which may not be compatible with all browsers. You can use open source software like Audacity to convert to other formats and implement a fallback system.&lt;/p&gt;
&lt;h3&gt;
  
  
  The project: Web Drums
&lt;/h3&gt;

&lt;p&gt;HTML&lt;br&gt;
&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;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"X-UA-Compatible"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"ie=edge"&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;Web Drums&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;h1&amp;gt;&lt;/span&gt;Web Drums&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;Beat the drums to make your own melody&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"stage"&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;id=&lt;/span&gt;&lt;span class="s"&gt;"drum-1"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"drums"&lt;/span&gt;&lt;span class="nt"&gt;&amp;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;id=&lt;/span&gt;&lt;span class="s"&gt;"drum-2"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"drums"&lt;/span&gt;&lt;span class="nt"&gt;&amp;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;id=&lt;/span&gt;&lt;span class="s"&gt;"drum-3"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"drums"&lt;/span&gt;&lt;span class="nt"&gt;&amp;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;id=&lt;/span&gt;&lt;span class="s"&gt;"drum-4"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"drums"&lt;/span&gt;&lt;span class="nt"&gt;&amp;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;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"app.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&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;We define a &lt;code&gt;#stage&lt;/code&gt; and we're we put our drums. We use &lt;code&gt;div&lt;/code&gt; elements for the drums&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#stage&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;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&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;We give the &lt;code&gt;#stage&lt;/code&gt;grid positioning and align it's children in 2 columns&lt;br&gt;
&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;.drums&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;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&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="no"&gt;peachpuff&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;We then give the drums a &lt;code&gt;border-radius&lt;/code&gt;and color so they can resemble drums.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;drum1&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;drum-1&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;drum2&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;drum-2&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;drum3&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;drum-3&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;drum4&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;drum-4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We get references to all the drums.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sound1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/beats/hand-tribal-drum.wav&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;sound2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/beats/hard-horror-hit-drum.wav&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;sound3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/beats/short-bass-hit.wav&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;sound4&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/beats/tribal-dry-drum.wav&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We then load the sounds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;drum1&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="s2"&gt;click&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="nx"&gt;sound1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;drum2&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="s2"&gt;click&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="nx"&gt;sound2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;drum3&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="s2"&gt;click&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="nx"&gt;sound3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;drum4&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="s2"&gt;click&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="nx"&gt;sound4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&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;Finally, we play the sounds when each drum is clicked.&lt;/p&gt;

&lt;p&gt;Here's a link to the repo on GitHub: &lt;a href="https://github.com/israelrotimi/webdrums" rel="noopener noreferrer"&gt;github.com/israelrotimi/webdrums&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go ahead and play with your drum!&lt;br&gt;
This is a basic implementation, I encourage you to build upon it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In conclusion&lt;/strong&gt;, In this article you learned about the HTML &lt;code&gt;Audio&lt;/code&gt; and how to use it.&lt;br&gt;
I believe you'll use it in your web projects.&lt;br&gt;
If you have any suggestions or additions, let us know in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I am a full stack NextJS developer and technical writer. I'm actively looking for gigs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

</description>
      <category>api</category>
      <category>html</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to write Semantic HTML</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Sat, 03 May 2025 09:56:16 +0000</pubDate>
      <link>https://dev.to/israelrotimi/how-to-write-semantic-html-185e</link>
      <guid>https://dev.to/israelrotimi/how-to-write-semantic-html-185e</guid>
      <description>&lt;p&gt;Hi there,&lt;br&gt;
I bet HTML was one of the first languages you learned.&lt;br&gt;
But how many times have you given thought as to using a &lt;code&gt;section&lt;/code&gt;instead of a &lt;code&gt;div&lt;/code&gt;?&lt;br&gt;
In this article we'll explore why Semantic HTML is so important and how to write it.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Semantic HTML
&lt;/h2&gt;

&lt;p&gt;What do we mean by&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Semantic&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It simply means 'meaningful'.&lt;br&gt;
Writing HTML that meaningful to both humans and computers.&lt;br&gt;
If someone viewing your HTML code can't tell what pieces of markup are for without comments, then it's probably not Semantic.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Semantic HTML
&lt;/h2&gt;

&lt;p&gt;Here are a few reasons&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Semantic HTML is the standard recommended by W3C&lt;/li&gt;
&lt;li&gt;It is better recognized by browsers and can benefit from default styling.&lt;/li&gt;
&lt;li&gt;It is better interpreted by screen readers&lt;/li&gt;
&lt;li&gt;It increases accessibility&lt;/li&gt;
&lt;li&gt;It gives our code structure, for instance, compare this:
&lt;/li&gt;
&lt;/ul&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;div&amp;gt;&lt;/span&gt;logo&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;id=&lt;/span&gt;&lt;span class="s"&gt;"hero"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"main-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Topic&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"subheading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sub Topic&lt;span class="nt"&gt;&amp;lt;/h1&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;
  Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Et eligendi dolorum explicabo,
earum atque accusamus sequi quo,
excepturi fugiat totam repellat incidunt
harum magni dignissimos dolores neque a ab autem.
&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;id=&lt;/span&gt;&lt;span class="s"&gt;"footer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Footer&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With this:&lt;br&gt;
&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;nav&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Logo&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Topic&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Sub Topic&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. 
  Voluptatem consectetur qui rerum,
  tenetur corporis ex explicabo omnis quam,
  earum expedita ipsam pariatur natus illo,
  officiis! Corporis, reiciendis unde deserunt facilis.
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
  Footer
&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;give me feedback in the comments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Semantic Tags
&lt;/h2&gt;

&lt;p&gt;Here are some semantic HTML Tags for everyday use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;nav&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;section&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;form&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;header&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;footer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aside&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;small&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;and so on...&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to write Semantic HTML
&lt;/h2&gt;

&lt;p&gt;To write Semantic HTML, you just need to be more thoughtful.&lt;br&gt;
Before you wrap that piece in a &lt;code&gt;div&lt;/code&gt;and throw CSS at it, think 🤔,&lt;br&gt;
What am I trying to to achieve?&lt;br&gt;
What is this piece of content going to do?&lt;/p&gt;

&lt;h2&gt;
  
  
  A guide on which tags to use for what
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;section&lt;/code&gt; Use it whenever you want to group content into sections, e.g, about section, contact section.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;small&lt;/code&gt; Use when you want to de-emphasize a piece of text.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;aside&lt;/code&gt; Use when you have content that will be separate from the normal flow of the document.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;form&lt;/code&gt; Use it to wrap input elements &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In conclusion&lt;/strong&gt;, Everyone can benefit from Semantic HTML and clean descriptive code in general. I hope you found this useful. Let me know in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I am a full stack NextJS developer and Technical Writer, I'm open to collaboration and discussions.&lt;/em&gt;&lt;br&gt;
Cheers.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>programming</category>
      <category>a11y</category>
    </item>
    <item>
      <title>CSS Selectors for Beginners</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Thu, 20 Mar 2025 05:55:57 +0000</pubDate>
      <link>https://dev.to/israelrotimi/css-selectors-for-beginners-32ad</link>
      <guid>https://dev.to/israelrotimi/css-selectors-for-beginners-32ad</guid>
      <description>&lt;p&gt;When styling a webpage, you need to know CSS and understand how to use the right selectors to achieve your desired result. Selectors help you target specific HTML elements to apply styles efficiently.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Universal Selector (&lt;code&gt;*&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;The universal selector applies styles to &lt;strong&gt;all elements&lt;/strong&gt; on the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;*&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="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;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&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;Use it sparingly, mainly for resetting default styles.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Element Selector (&lt;code&gt;element&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;The element selector targets all instances of a specific HTML tag.&lt;br&gt;
&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;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="no"&gt;blue&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;16px&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;You can use this for general styling of common elements (e.g., &lt;code&gt;body&lt;/code&gt;, &lt;code&gt;h1&lt;/code&gt;, &lt;code&gt;p&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Class Selector (&lt;code&gt;.class&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;The class selector targets elements with a specific class.&lt;br&gt;
&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;.highlight&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;yellow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"highlight"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This text is highlighted.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Best for &lt;strong&gt;reusable styles&lt;/strong&gt; across multiple elements.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. ID Selector (&lt;code&gt;#id&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;The ID selector targets an element with a specific &lt;code&gt;id&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#header&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;navy&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;white&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;10px&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Welcome to My Website&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use for 'one-off' styles only.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Grouping Selector (&lt;code&gt;A, B, C&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;This allows styling multiple elements at once.&lt;br&gt;
&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;h1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;h3&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="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="no"&gt;darkslategray&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;It helps to &lt;strong&gt;avoid redundant styles&lt;/strong&gt; and keep CSS &lt;strong&gt;clean&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Descendant Selector (&lt;code&gt;A B&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Targets elements inside a specific parent.&lt;br&gt;
&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;nav&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;list-style-type&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;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They Keep selectors &lt;strong&gt;short and readable&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Child Selector (&lt;code&gt;A &amp;gt; B&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Targets &lt;strong&gt;direct&lt;/strong&gt; children only.&lt;br&gt;
&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;div&lt;/span&gt; &lt;span class="o"&gt;&amp;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="no"&gt;red&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Styled paragraph&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;  &lt;span class="c"&gt;&amp;lt;!-- Affected --&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;p&amp;gt;&lt;/span&gt;Not affected&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;  &lt;span class="c"&gt;&amp;lt;!-- Not affected --&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;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use when &lt;strong&gt;only direct children&lt;/strong&gt; need styling.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Adjacent Sibling Selector (&lt;code&gt;A + B&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Targets an element &lt;strong&gt;immediately after&lt;/strong&gt; another.&lt;br&gt;
&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;h1&lt;/span&gt; &lt;span class="o"&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="no"&gt;green&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Heading&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;This paragraph is green.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This one is not.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use for styling elements &lt;strong&gt;right after&lt;/strong&gt; another.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. General Sibling Selector (&lt;code&gt;A ~ B&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Targets &lt;strong&gt;all matching siblings&lt;/strong&gt; after a specific element.&lt;br&gt;
&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;h1&lt;/span&gt; &lt;span class="o"&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="no"&gt;orange&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Heading&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;This is orange.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is also orange.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use when multiple elements &lt;strong&gt;after a specific one&lt;/strong&gt; need styling.&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Mastering selectors&lt;/strong&gt; makes styling &lt;strong&gt;easier and more structured&lt;/strong&gt;! 🚀&lt;br&gt;
What do you normally use when styling?&lt;/p&gt;




&lt;p&gt;I'm a full stack JS/TS developer open to collaboration and job offers. Feel free to reach out to me&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Flexbox makes responsive design so much easier</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Thu, 20 Mar 2025 05:13:04 +0000</pubDate>
      <link>https://dev.to/israelrotimi/how-flexbox-makes-responsive-design-so-much-easier-2mnm</link>
      <guid>https://dev.to/israelrotimi/how-flexbox-makes-responsive-design-so-much-easier-2mnm</guid>
      <description>&lt;p&gt;Since the advent of mobile devices and the massive adoption of these devices by users, developers have had to build websites that adapt well to different screen sizes. There are various methods to employ in responsive design, but layout was the most tricky—until &lt;strong&gt;Flexbox&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before Flexbox: Using Floats and Positioning
&lt;/h2&gt;

&lt;p&gt;Before Flexbox, developers relied on &lt;strong&gt;CSS floats&lt;/strong&gt;, &lt;strong&gt;inline-block&lt;/strong&gt;, and &lt;strong&gt;absolute positioning&lt;/strong&gt; to create layouts. These methods worked but often required extra markup, clearfix hacks, and tricky positioning adjustments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: A Simple Two-Column Layout Using Floats
&lt;/h3&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;Float Layout&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;800px&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;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* clearfix to contain floated elements */&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.left-column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&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;lightblue&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.right-column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&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;lightcoral&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="c"&gt;/* Clearing floats */&lt;/span&gt;
        &lt;span class="nc"&gt;.clearfix&lt;/span&gt;&lt;span class="nd"&gt;::after&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;""&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;table&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;both&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&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;"container clearfix"&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;"left-column"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Main Content&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;"right-column"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sidebar&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;This method had problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It required &lt;strong&gt;clearfix hacks&lt;/strong&gt; to prevent layout breaking.&lt;/li&gt;
&lt;li&gt;Columns could collapse if their content exceeded the available space.&lt;/li&gt;
&lt;li&gt;Reordering elements required &lt;strong&gt;complex DOM changes&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example: Centering an Element Using &lt;code&gt;position: absolute&lt;/code&gt;
&lt;/h3&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;Absolute Centering&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&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;100vh&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="n"&gt;lightgray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-50%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;-50%&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;teal&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;20px&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;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&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;"container"&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;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Centered Box&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;While this method works, it &lt;strong&gt;requires absolute positioning and &lt;code&gt;transform&lt;/code&gt; hacks&lt;/strong&gt;, making responsive adjustments harder.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Flexbox Simplifies Layouts
&lt;/h2&gt;

&lt;p&gt;With Flexbox, you can easily create complex layouts &lt;strong&gt;without floats or positioning hacks&lt;/strong&gt;. It provides properties for alignment, distribution, and responsiveness.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example: Two-Column Layout Using Flexbox
&lt;/h3&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;Flexbox Layout&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.container&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;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;800px&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="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.left-column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Takes up more space */&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;lightblue&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.right-column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Takes up less space */&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;lightcoral&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;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&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;"container"&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;"left-column"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Main Content&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;"right-column"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sidebar&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;h4&gt;
  
  
  Why is this better?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No need for clearfix hacks&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic element sizing&lt;/strong&gt; (no need for fixed widths)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easier responsiveness&lt;/strong&gt; (use &lt;code&gt;flex-wrap&lt;/code&gt; to stack columns on smaller screens)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Example: Centering with Flexbox
&lt;/h3&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;Flexbox Centering&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.container&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="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Center horizontally */&lt;/span&gt;
            &lt;span class="nl"&gt;align-items&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="c"&gt;/* Center vertically */&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;100vh&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="n"&gt;lightgray&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.box&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;teal&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;20px&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;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&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;"container"&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;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Centered Box&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;h4&gt;
  
  
  Why is this better?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;No need for &lt;strong&gt;absolute positioning&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;No &lt;strong&gt;transform&lt;/strong&gt; hacks&lt;/li&gt;
&lt;li&gt;Works &lt;strong&gt;dynamically&lt;/strong&gt; without recalculating margins&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Example: Responsive Flexbox Layout
&lt;/h3&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;Responsive Flexbox&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nc"&gt;.container&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;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&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;salmon&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;20px&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="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&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;"container"&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;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Box 1&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;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Box 2&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;"box"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Box 3&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;h4&gt;
  
  
  Why is this better?
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;flex-wrap&lt;/code&gt; ensures responsiveness&lt;/strong&gt; (boxes stack when screen shrinks)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;gap&lt;/code&gt; provides spacing&lt;/strong&gt; without extra margins&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No complex media queries needed&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;Before Flexbox, layouts relied on &lt;strong&gt;floats, positioning, and inline-block hacks&lt;/strong&gt;, making responsiveness difficult. Flexbox eliminates these problems by providing a &lt;strong&gt;more intuitive&lt;/strong&gt; and &lt;strong&gt;powerful&lt;/strong&gt; way to align and distribute elements.&lt;br&gt;
The next time you feel overwhelmed by Responsive design, just remember flexbox.&lt;br&gt;
What are your thoughts on this.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm a full stack JS/TS developer available for hire. Feel free to reach out to me for your next project&lt;/em&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>layout</category>
      <category>programming</category>
    </item>
    <item>
      <title>What building a phone number validator taught me about RegEx: FCC solution</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Sun, 23 Feb 2025 01:37:23 +0000</pubDate>
      <link>https://dev.to/israelrotimi/what-building-a-phone-number-validator-taught-me-about-regex-fcc-solution-2n26</link>
      <guid>https://dev.to/israelrotimi/what-building-a-phone-number-validator-taught-me-about-regex-fcc-solution-2n26</guid>
      <description>&lt;p&gt;Hi again, It's Israel, with another blazing article. 🔥🚀&lt;br&gt;
This is a continuation of the series as I document my journey to getting the FreeCodeCamp certifications.&lt;br&gt;
Let's dive in.&lt;/p&gt;
&lt;h2&gt;
  
  
  What are Regular Expressions
&lt;/h2&gt;

&lt;p&gt;Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects.&lt;/p&gt;

&lt;p&gt;TBH, I've done something similar before when I started learning JavaScript, like 2 years ago. I did a form validation project following a tutorial where I validated a name, phone number, email and password using regular expressions.&lt;/p&gt;

&lt;p&gt;So I thought, should be easy right? No. I have to give it to FreeCodeCamp, some of their projects aren't just tough, they're thorough ensuring proficiency in the skill and not just competence. That's some work they put in there.&lt;/p&gt;
&lt;h2&gt;
  
  
  The challenge:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4y1e9xggpy0gkz8xzbiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4y1e9xggpy0gkz8xzbiy.png" alt="screenshot showing the challenge" width="459" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was given a task to build an app that validates US phone numbers in five different formats!&lt;br&gt;
I immediately built the UI with basic styling.&lt;br&gt;
Here's the code: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F869yia7drip9hxyv33dt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F869yia7drip9hxyv33dt.png" alt="Image description" width="800" height="561"&gt;&lt;/a&gt;&lt;br&gt;
Do check my profile on FreeCodeCamp at: &lt;a href="https://www.freecodecamp.org/Israel-Rotimi" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/Israel-Rotimi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my script.js file I wrote this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const userInput = document.querySelector("#user-input");
const checkBtn = document.querySelector("#check-btn");
const clearBtn = document.querySelector("#clear-btn");
const resultsDiv = document.querySelector("#results-div");

// Event Listeners
checkBtn.addEventListener("click", () =&amp;gt; {
  const input = userInput.value;
  if (input === ""){
    alert("Please provide a phone number");
  }else {
    if(validatePhone(input)){
      resultsDiv.innerHTML = `Valid US number: ${input}`;
    }else {
      resultsDiv.innerHTML = `Invalid US number: ${input}`;
    }
  }
})
clearBtn.addEventListener("click", () =&amp;gt; {
  resultsDiv.innerHTML = "";
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first part defines references to the DOM elements&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const userInput = document.querySelector("#user-input");
const checkBtn = document.querySelector("#check-btn");
const clearBtn = document.querySelector("#clear-btn");
const resultsDiv = document.querySelector("#results-div");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next part has two event listeners, one performs the validation function and one clears the &lt;code&gt;resultsDiv&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Event Listeners
checkBtn.addEventListener("click", () =&amp;gt; {
  const input = userInput.value;
  if (input === ""){
    alert("Please provide a phone number");
  }else {
    if(validatePhone(input)){
      resultsDiv.innerHTML = `Valid US number: ${input}`;
    }else {
      resultsDiv.innerHTML = `Invalid US number: ${input}`;
    }
  }
})
clearBtn.addEventListener("click", () =&amp;gt; {
  resultsDiv.innerHTML = "";
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the &lt;code&gt;validatePhone&lt;/code&gt; function, I define a regular expression, test the string against the regex using built-in method &lt;code&gt;regExp.test&lt;/code&gt; and return the result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function validatePhone(num){
  const re = /^(1\s?)?((\(\d{3}\)|\d{3})\s?-?\d{3}\s?-?\d{4})$/;
  const result = re.test(num);
  return result;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;as simple as it looks, this part took 80% of my time!&lt;br&gt;
I had to tweak and tweak till it passed all tests, And trust me, when I say they're thoroughly tested.&lt;/p&gt;

&lt;p&gt;Let's break the regex down: &lt;code&gt;/^(1\s?)?((\(\d{3}\)|\d{3})\s?-?\d{3}\s?-?\d{4})$/&lt;/code&gt;&lt;br&gt;
&lt;code&gt;^(1\s?)?&lt;/code&gt; This part allows for an option '1' with without white space. The caret &lt;code&gt;^&lt;/code&gt; indicates that this pattern must start a string.&lt;br&gt;
&lt;code&gt;()&lt;/code&gt; is used to group things together, here we're grouping the '1' and white space characters together.&lt;br&gt;
&lt;code&gt;?&lt;/code&gt; is used to mark optional characters. In our string it is used to make 1 optional&lt;br&gt;
&lt;code&gt;((\(\d{3}\)|\d{3})&lt;/code&gt; this part matches the first three digits with or without parentheses&lt;br&gt;
&lt;code&gt;|&lt;/code&gt; is used as literal &lt;code&gt;or&lt;/code&gt; as in &lt;code&gt;((\(\d{3}\)&lt;/code&gt; &lt;code&gt;|&lt;/code&gt; &lt;code&gt;\d{3})&lt;/code&gt;&lt;br&gt;
&lt;code&gt;\d&lt;/code&gt; matches any digit&lt;br&gt;
we use backslash to escape the bracket &lt;code&gt;\(&lt;/code&gt; and &lt;code&gt;\)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;{}&lt;/code&gt; is a quantifier, it specifies how much it should repeat the character before it.&lt;br&gt;
&lt;code&gt;\s?-?&lt;/code&gt; matches a white space or dash optionally&lt;br&gt;
&lt;code&gt;$&lt;/code&gt; this ensures the string ends with the characters specified before it.&lt;/p&gt;

&lt;p&gt;And that is my solution. Please share your experience with regular Expressions in the comments&lt;/p&gt;

</description>
      <category>freecodecamp</category>
      <category>regex</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to find a palindrome: my FCC solution</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Sun, 23 Feb 2025 00:03:22 +0000</pubDate>
      <link>https://dev.to/israelrotimi/how-to-find-a-palindrome-my-fcc-solution-510g</link>
      <guid>https://dev.to/israelrotimi/how-to-find-a-palindrome-my-fcc-solution-510g</guid>
      <description>&lt;p&gt;Hi there, 👋&lt;br&gt;
As of the time of writing, I only have one FreeCodeCamp Certificate, Responsive web design with HTML and CSS.&lt;br&gt;
(It's on my &lt;a href="https://linkedin.com/in/israel-rotimi" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; page). That doesn't accurately reflect my skills cause I use more JavaScript these days. So, I'm on a quest to get the other FCC (FreeCodeCamp) certifications to increase my skill and credibility as a developer.&lt;/p&gt;

&lt;p&gt;This is a post in a new series I'll be putting up. My quest to get the remaining FCC certs (or as much as I can get) and add to my portfolio. I know FCC certs are not professionally recognized but they are credible and you get to build projects that can be recognized (depending on how you build them). Okay, enough intro, let's dig in.&lt;/p&gt;
&lt;h2&gt;
  
  
  The problem:
&lt;/h2&gt;

&lt;p&gt;I'm on the home page for the JavaScript Algorithms and Data Structures Certification.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6opishmcs9ysr1h6lsj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6opishmcs9ysr1h6lsj.png" alt="FreeCodeCamp JavaScript cert homepage" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the first required project is a to build a palindrome checker.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is a Palindrome?
&lt;/h2&gt;

&lt;p&gt;A palindrome is a word or phrase that can be read the same way forwards and backwards, ignoring punctuation, case, and spacing.&lt;/p&gt;
&lt;h2&gt;
  
  
  How I approached the problem
&lt;/h2&gt;

&lt;p&gt;It didn't seem too hard and I thought out the process (and tested it on VScode) before coding the solution.&lt;br&gt;
First, you define your input and output like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    &amp;lt;div id="wrapper"&amp;gt;
        &amp;lt;h1&amp;gt;Palindrome Checker&amp;lt;/h1&amp;gt;
        &amp;lt;form action=""&amp;gt;
            &amp;lt;input type="text" id="text-input" name="text-input"&amp;gt;
            &amp;lt;button id="check-btn"&amp;gt;Check&amp;lt;/button&amp;gt;
            &amp;lt;p id="result"&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;/form&amp;gt;
        &amp;lt;div class="info"&amp;gt;
            &amp;lt;p&amp;gt;A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;You can add styling, these are the styles I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#wrapper {
    width: 100vw;
    height: 100vh;
    background-color: #1f153d;
    overflow: hidden;
    color: white;
    margin: auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
form {
    text-align: center;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: white;
    color: black;
}
button {
    background-color: #1f153d;
    padding: 10px;
    border-radius: 5px;
    color: white;
}
.info {
    padding: 10px;
    margin-top: 20px;
    border-radius: 10px;
    background-color: green;
    width: 50%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should look like this:&lt;/p&gt;

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

&lt;p&gt;For the functionality, we reference all DOM elements we'll be using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const textInput = document.getElementById('text-input');
const checkBtn = document.getElementById('check-btn');
const result = document.getElementById('result');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then listen for clicks on our button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checkBtn.addEventListener('click', () =&amp;gt; {})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;inside the function we ensure the input is not empty, then we call the function &lt;code&gt;isPalindrome()&lt;/code&gt; to check if the string is a palindrome.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checkBtn.addEventListener('click', () =&amp;gt; {
    const text = textInput.value
    if (text === "") {
        alert("Please input a value")
    }
    if (isPalindrome(text)) {
        result.innerHTML = `${text} is a palindrome`;
    } else {
         result.innerHTML = `${text} is not a palindrome`;
    }

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

&lt;/div&gt;



&lt;p&gt;Let's implement the &lt;code&gt;isPalindrome&lt;/code&gt; function below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function isPalindrome(text) {
    // Convert to lowercase to get rid of casing
    text = text.toLowerCase();
    // Split the string by all white space characters into an array 
    text = text.split(/\s+/);
    // Join the array to get rid of the white space
    text = text.join("");
    // Using this regular expression, remove all punctuation marks
    text = text.replace(/[\.\(\)\[\]\{\}&amp;lt;&amp;gt;_,!?"':;-]/g, "");
    // Finally perform your test
    let reversedText = text.split("").reverse().join("");
    return reversedText === text; // return the result
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function first convert's the string to lowercase, it then removes the white space and the punctuation. It then reverses the string and compares the reversed string with the original.&lt;br&gt;
If you spells the same way, the function returns true else it returns false.&lt;/p&gt;

&lt;p&gt;So, that was how I completed the first of 5 certification projects required for the FCC certificate. If you've taken the course or earned the certs, let us know in the comments. You've got a different view let us know in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm a Full Stack JavaScript Developer who's job searching, open to freelance and working on passion projects. Want to learn more about me, check my &lt;a href="https://linkedin.com/in/israel-rotimi" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, also check out my projects on  &lt;a href="https://github.com/israelrotimi" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>freecodecamp</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>MongoDB is a business choice</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Sat, 15 Feb 2025 08:47:10 +0000</pubDate>
      <link>https://dev.to/israelrotimi/mongodb-is-a-business-choice-45db</link>
      <guid>https://dev.to/israelrotimi/mongodb-is-a-business-choice-45db</guid>
      <description>&lt;p&gt;Yep, just discovered it.&lt;/p&gt;

&lt;p&gt;In the ever-evolving landscape of web development, selecting the right database is crucial for both performance and scalability. As a frontend developer specializing in Next.js, ReactJS, and TailwindCSS, I recently embarked on integrating a backend into a dashboard application I initially built using a mock API. This journey led me to explore MongoDB, and the experience has been enlightening.&lt;/p&gt;

&lt;p&gt;I've always considered myself a MERN stack developer although I had never actually touched MongoDB, that is, until now.&lt;/p&gt;

&lt;p&gt;I just completed a task I was given as an assesment for a for a frontend job, &lt;a href="https://dev.tourl"&gt;(find out more about it here)&lt;/a&gt;, where I built a dashboard app with React and pulled data from a mock API.&lt;br&gt;
Since I was done with that I decided to build a backend for it and turn it into a portfolio project. That was how I dabbled into MongoDB&lt;/p&gt;

&lt;p&gt;I used MongoDB atlas for my project. I went on to designing the Schema for my backend using mongoose and TBH, it's pretty flexible. Scalability is built in from the get go.&lt;br&gt;
The fact that you can define your data in JSON-like structures is just awesome as it gives JavaScript devs a native feel.&lt;br&gt;
Unlike in SQL DBs where you have to define tables for different datasets and then join the tables which can get complicated quickly if your application's data doesn't have much shape.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schema Design: A Comparative Insight&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In traditional SQL databases, structuring data for an application that includes users, blogs, comments, and likes would require multiple tables and complex JOIN operations. For instance, you'd need separate tables for users, blogs, comments, and likes, each with defined relationships and constraints.&lt;/p&gt;

&lt;p&gt;In contrast, MongoDB's document-oriented approach allows for embedding related data within a single document. This means that a blog post can contain its comments and associated likes directly within its document structure. Such embedding reduces the need for JOIN operations, potentially enhancing read performance and simplifying data retrieval.&lt;/p&gt;

&lt;p&gt;Say, for instance, my I have an App where users can write blogs and comment on blogs and rate them. In SQL DBs, I will need one table for users, one for blogs, one for comments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE TABLE Users (
    id INT PRIMARY KEY AUTO_INCREMENT,
    username VARCHAR(255) UNIQUE NOT NULL,
    -- ... other user fields
    createdAt TIMESTAMP,
    updatedAt TIMESTAMP
);

CREATE TABLE Blogs (
    id INT PRIMARY KEY AUTO_INCREMENT,
    title VARCHAR(255) NOT NULL,
    content TEXT NOT NULL,
    author_id INT NOT NULL,  -- Foreign key referencing Users
    createdAt TIMESTAMP,
    updatedAt TIMESTAMP,
    FOREIGN KEY (author_id) REFERENCES Users(id)
);

CREATE TABLE Comments (
    id INT PRIMARY KEY AUTO_INCREMENT,
    content TEXT NOT NULL,
    user_id INT NOT NULL,  -- Foreign key referencing Users
    blog_id INT NOT NULL, -- Foreign key referencing Blogs
    createdAt TIMESTAMP,
    updatedAt TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES Users(id),
    FOREIGN KEY (blog_id) REFERENCES Blogs(id)
);

CREATE TABLE Likes (
    id INT PRIMARY KEY AUTO_INCREMENT,
    user_id INT NOT NULL, -- Foreign key referencing Users
    comment_id INT NOT NULL, -- Foreign key referencing Comments
    createdAt TIMESTAMP,
    updatedAt TIMESTAMP,
    FOREIGN KEY (user_id) REFERENCES Users(id),
    FOREIGN KEY (comment_id) REFERENCES Comments(id)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I will have to link all of them together using Joins.&lt;br&gt;
Not bad, but in MongoDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const userSchema = new Schema({
  username: { type: String, required: true, unique: true },
  email: { type: String, required: true, unique: true },
  password: { type: String, required: true }, // Securely hash this in your app
  blogs: [{
    title: { type: String, required: true },
    content: { type: String, required: true },
    comments: [{
      content: { type: String, required: true },
      user: { type: Schema.Types.ObjectId, ref: 'User', required: true },
      likes: [{ user: { type: Schema.Types.ObjectId, ref: 'User' } }],
      timestamps: true
    }],
    timestamps: true
  }]
}, { timestamps: true });

const User = mongoose.model('User', userSchema);

module.exports = { User };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why MongoDB Stands Out&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Several features make MongoDB a compelling choice for developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: MongoDB's schema-less design accommodates evolving data models without the need for extensive migrations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Built-in sharding and replication support horizontal scaling, ensuring the database can handle increased load as applications grow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;: Storing data in BSON (Binary JSON) format allows for efficient data retrieval and manipulation, which is particularly beneficial for applications requiring high throughput.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer-Friendly&lt;/strong&gt;: The alignment with JSON and JavaScript ecosystems streamlines the development process, reducing the cognitive load when switching between frontend and backend development.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Integrating MongoDB into my project has been a transformative experience. Its alignment with modern JavaScript frameworks and its flexible, scalable nature make it an excellent choice for developers looking to build robust applications efficiently. For those considering a transition from traditional relational databases or starting new projects, MongoDB offers a compelling blend of performance and ease of use.&lt;/p&gt;

&lt;p&gt;Please share your thoughts and opinions in the comments below.&lt;/p&gt;

&lt;p&gt;*Follow me on LinkedIn: &lt;a href="https://linked.com/in/israel-rotimi" rel="noopener noreferrer"&gt;https://linked.com/in/israel-rotimi&lt;/a&gt; and check out my other posts. I'm open to Job offers and freelance work. Feel free to contact: &lt;a href="//mailto:izzyrotimi@gmail.com"&gt;izzyrotimi@gmail.com&lt;/a&gt; * &lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>mongoose</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Struggling with JavaScript? Read this</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Fri, 24 Jan 2025 23:17:39 +0000</pubDate>
      <link>https://dev.to/israelrotimi/struggling-with-javascript-read-this-kbj</link>
      <guid>https://dev.to/israelrotimi/struggling-with-javascript-read-this-kbj</guid>
      <description>&lt;p&gt;So you've learned HTML and CSS, even built a simple website and now you're learning JavaScript. It's been weeks now, even several months and you barely understand a thing! I've been there.&lt;/p&gt;

&lt;p&gt;In this article, I will show you how to learn JavaScript fast and avoid burning out before you even start.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Why you struggle with JavaScript&lt;/li&gt;
&lt;li&gt;The right approach&lt;/li&gt;
&lt;li&gt;Suggested roadmap&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why you struggle with JavaScript
&lt;/h2&gt;

&lt;p&gt;JavaScript can feel like a steep hill to climb, especially when compared to HTML and CSS. Here are some common reasons why you might be struggling:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Too much information, too fast&lt;/strong&gt;: JavaScript has a vast ecosystem with endless tutorials, frameworks, and libraries. It’s easy to feel overwhelmed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Syntax and concepts&lt;/strong&gt;: If you’re new to programming, concepts like closures, promises, or async/await can seem like a foreign language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not enough practice&lt;/strong&gt;: Simply watching tutorials or reading guides isn’t enough. Without practical application, the concepts won’t stick.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skipping the basics&lt;/strong&gt;: Diving into advanced topics without a solid foundation can leave you confused and frustrated.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The right approach
&lt;/h2&gt;

&lt;p&gt;If you want to learn JavaScript effectively, you need a structured approach that prioritizes practice and builds your confidence step by step. Here’s what works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Master the fundamentals&lt;/strong&gt;: Focus on understanding variables, data types, loops, functions, and conditional statements before moving to advanced topics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn incrementally&lt;/strong&gt;: Tackle one concept at a time. Don’t jump into frameworks or libraries before you’re comfortable with vanilla JavaScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practice, practice, practice&lt;/strong&gt;: Write code every day. Solve small problems, build simple projects, and review your solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test your understanding&lt;/strong&gt;: Use test cases to validate your code. This not only improves your problem-solving skills but also prepares you for real-world scenarios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work on projects&lt;/strong&gt;: Build practical and challenging applications that integrate multiple concepts. Projects give you a sense of achievement and look great on your portfolio.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Suggested roadmap
&lt;/h2&gt;

&lt;p&gt;Here’s a four-week roadmap to mastering JavaScript:&lt;/p&gt;

&lt;h3&gt;
  
  
  Week 1: Fundamentals
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learn about variables, data types, and operators.&lt;/li&gt;
&lt;li&gt;Practice using loops and conditional statements.&lt;/li&gt;
&lt;li&gt;Write functions and understand scope.&lt;/li&gt;
&lt;li&gt;Suggested exercise: Write a function to check if a number is prime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Week 2: ES6+ Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Learn about let/const, template literals, and arrow functions.&lt;/li&gt;
&lt;li&gt;Understand destructuring, spread/rest operators, and modules.&lt;/li&gt;
&lt;li&gt;Get comfortable with promises and async/await.&lt;/li&gt;
&lt;li&gt;Suggested exercise: Write a function to fetch data from an API using async/await.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Week 3: Arrays, Objects, and Text
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Master array methods like map, filter, and reduce.&lt;/li&gt;
&lt;li&gt;Work with objects: create, update, and loop through them.&lt;/li&gt;
&lt;li&gt;Practice string manipulation techniques.&lt;/li&gt;
&lt;li&gt;Suggested exercise: Create a function to count the occurrences of each word in a string.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Week 4: Build Projects
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Consolidate your knowledge by building real-world projects:

&lt;ul&gt;
&lt;li&gt;A to-do list app.&lt;/li&gt;
&lt;li&gt;A scientific calculator.&lt;/li&gt;
&lt;li&gt;A simple weather app using an API.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Use test cases to validate your code.&lt;/li&gt;

&lt;li&gt;Suggested exercise: Build a scientific calculator that uses all the math functions you’ve learned.&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;If you're a beginner I suggest learning some theory and actively practicing what you learned.&lt;br&gt;
To help you follow this roadmap, I’ve created a &lt;a href="https://master-js-4weeks-app.vercel.app/" rel="noopener noreferrer"&gt;JavaScript Learning App&lt;/a&gt;. This app provides interactive exercises, test cases, and guided projects to take you from beginner to job-ready in four weeks. Give it a try and start your JavaScript journey today!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Participating in a hackathon: My experience</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Fri, 10 Jan 2025 04:10:00 +0000</pubDate>
      <link>https://dev.to/israelrotimi/participating-in-a-hackathon-my-experience-177g</link>
      <guid>https://dev.to/israelrotimi/participating-in-a-hackathon-my-experience-177g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;When you have nothing to lose, then you should probably try&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I participated in the &lt;a href="https://hackathon.jsmastery.pro" rel="noopener noreferrer"&gt;JSMastery&lt;/a&gt; hackathon organized by &lt;a href="https://www.youtube.com/@javascriptmastery" rel="noopener noreferrer"&gt;JSMastery&lt;/a&gt; for reaching 1 million subscribers on YouTube.&lt;/p&gt;

&lt;p&gt;I spent one week trying to come up with an idea, I then started developing the idea 5 days to submission deadline😰.&lt;/p&gt;

&lt;p&gt;I used AI to give me a head start then developed from there. TBH, AI helped me meet the deadline by not allowing me waste time weeding in the dark.&lt;/p&gt;

&lt;p&gt;The hackathon's theme was &lt;strong&gt;Build and Deploy&lt;/strong&gt;. So you could build anything, so long as you deploy it. So I built an online game portal where you can find and play games online for free.&lt;br&gt;
I used the &lt;a href="https://freetogame.com/api-doc" rel="noopener noreferrer"&gt;freetogame API&lt;/a&gt; which only had PC games. I couldn't find a free service for mobile games so I stuck with what I had.&lt;/p&gt;

&lt;p&gt;So, the challenge was to build a frontend that displays these games in a user friendly way. Easy right? no, not at all.&lt;br&gt;
I used Next.js to build this, so I was becoming more cconversant with the framework in the process.&lt;/p&gt;

&lt;p&gt;When it came to implementing search functionality, I blacked out.&lt;br&gt;
I didn't know to somehow capture the state of the search term nd query the API. cause state is native to the component it's used in. But I overcame that hurdle.&lt;/p&gt;

&lt;p&gt;Long story short, everything went well... till I decided to deploy it, then all hell let loose😱. Vercel rolled out a ton of bugs for me. I solved them one by one but one wan't clear and seemed impossible to solve&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: in categories/categoryTabs.tsx type object doesn't match type Promise

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

&lt;/div&gt;



&lt;p&gt;I tried fixing it with AI but everything AI gave did not work. Instead it gave this error&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: ...PageProps is missing the following properties from Promise 

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

&lt;/div&gt;



&lt;p&gt;I tried all I could, went back and forth with the AI to no avail.&lt;br&gt;
I submitted my project with the URL to the live site which wasn't live yet and the GitHub repo, risking being disqualified. I submitted few hours to the final deadline.&lt;br&gt;
To add to the pain we were having a power outage (It's common where I come from) the night I submitted and the night before so I was forced to do the debugging and submission on my tablet.&lt;/p&gt;

&lt;p&gt;Next morning, power was restored.I then decided to setup copilot within VScode since it was now free. I told it my problem it was the same things as before, so I gave it my code as reference and told it the others didn't work. It then offered the fix which was to treat the Params object as a Promise: &lt;br&gt;
before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const page = async ({params}: { params: { category: string } }) =&amp;gt; {
  console.log(params)
    const {category} = await params;
    const games = await fetchGamesByCategory(category);
...
}

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

&lt;/div&gt;



&lt;p&gt;after fix&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Change the the params type to a Promise instead of an
//object, and then await the params to get the category
const page = async ({params}: { params: Promise&amp;lt;{ category: string }&amp;gt; }) =&amp;gt; {
  console.log(params)
    const {category} = await params;
    const games = await fetchGamesByCategory(category);
...
}

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

&lt;/div&gt;



&lt;p&gt;And that solved it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use AI in ideating and debugging&lt;/li&gt;
&lt;li&gt;Install GitHub copilot, it's free!&lt;/li&gt;
&lt;li&gt;Embrace the process&lt;/li&gt;
&lt;li&gt;Don't give up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check out the &lt;a href="https://github.com/israelrotimi/game-max" rel="noopener noreferrer"&gt;repo&lt;/a&gt; with the full git history as well as the &lt;a href="https://game-max-tjf2.vercel.app/" rel="noopener noreferrer"&gt;live site&lt;/a&gt; and tell me what you think about it.&lt;/p&gt;

</description>
      <category>hackathon</category>
      <category>competativeprogramming</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What Building💻 a WebGL App Taught Me About Debugging</title>
      <dc:creator>Israel Rotimi</dc:creator>
      <pubDate>Thu, 12 Dec 2024 21:17:44 +0000</pubDate>
      <link>https://dev.to/israelrotimi/what-building-a-webgl-app-taught-me-about-debugging-44cf</link>
      <guid>https://dev.to/israelrotimi/what-building-a-webgl-app-taught-me-about-debugging-44cf</guid>
      <description>&lt;h2&gt;
  
  
  Painful Insights from a more than a month-long journey
&lt;/h2&gt;

&lt;p&gt;Hi there 👋,&lt;br&gt;
I'm Israel Rotimi and I'm a JavaScript developer, I specialize in all things JavaScript from frontend to backend, feel free to reach out to me.&lt;/p&gt;

&lt;p&gt;So, I was building a website for myself. It's a portfolio website that incorporates animations into the design. So I was actually following a tutorial on youtube on the same project, then I ran into an error I couldn't seem to solve when I added a 3d object to the scene.&lt;/p&gt;

&lt;p&gt;The object was rendered using three.js and the stack was Next.js.&lt;br&gt;
Everything worked fine until I added the object.&lt;br&gt;
It would compile successfully in the terminal and will start rendering in the browser, then all of a sudden throw this screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvw36wslg68045kdml7am.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvw36wslg68045kdml7am.png" alt="Unhandled runtime error: Error creating webgl context" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My heart stopped💔. I thought does my computer not support webgl! &lt;br&gt;
I can't afford another right now, then I thought webgl was said to be supported a variety of systems why shouldn't mine support it. I was using chrome updated to the latest version, so I tried to see if there was anything in the code I could do to solve it.&lt;br&gt;
I then searched through all the settings looking for webgl, all I saw was this setting: "Use graphics acceleration where possible" and it was turned on. So I abandoned the project for the next few weeks.&lt;/p&gt;

&lt;p&gt;After being motivated again, I decided to take a look at the project. I asked claude ai for help and it suggested isolating the suspected cause. I did that and same error then I used firefox dev instead of chrome and it worked without the error. I later tried it on edge but it gave the same error as in chrome. &lt;/p&gt;

&lt;p&gt;I continued development with firefox dev but was worried my project couldn't run on other browsers. I searched through the settings on edge and found the same setting I saw on chrome: "Use graphics acceleration where possible" and it was enabled. I disabled the setting to see what would happen.&lt;/p&gt;

&lt;p&gt;To my greatest surprise, the app ran without the error. I did the same on chrome and same result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's what I learned from this journey&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Be systematic in your debugging approach: Isolate the problem, test different browsers (where that applies), test across multiple use cases&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't just give up too easily; It's not the end of the world&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you feel stuck, take a break, then come back refreshed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lastly, be curious, experiment. I wouldn't have known why my app wasn't working if I didn't change the setting&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;BTW, I'm still working on that project but you can check it out here: &lt;a href="https://github.com/israelrotimi/my-3d-nextjs-portfolio" rel="noopener noreferrer"&gt;https://github.com/israelrotimi/my-3d-nextjs-portfolio&lt;/a&gt; If you do please leave a ⭐ and leave your thought's about that in this thread as well. Thanks&lt;/p&gt;

&lt;p&gt;Please share your thoughts and takeaways. I'd like to know if anyone has been in a similar situation. Kindly share&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>browser</category>
      <category>webgl</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
