<?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: David Sudi</title>
    <description>The latest articles on DEV Community by David Sudi (@davythedev).</description>
    <link>https://dev.to/davythedev</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%2F834688%2F33a8ffa7-c655-430a-8e66-58e2adaf66f8.jpg</url>
      <title>DEV Community: David Sudi</title>
      <link>https://dev.to/davythedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/davythedev"/>
    <language>en</language>
    <item>
      <title>Struggling with Django's HTTPS development server issues? I have written a simple guide to expose your Django project securely using ngrok.</title>
      <dc:creator>David Sudi</dc:creator>
      <pubDate>Fri, 03 Jan 2025 18:14:02 +0000</pubDate>
      <link>https://dev.to/davythedev/struggling-with-djangos-https-development-server-issues-i-have-written-a-simple-guide-to-397n</link>
      <guid>https://dev.to/davythedev/struggling-with-djangos-https-development-server-issues-i-have-written-a-simple-guide-to-397n</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/davythedev" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F834688%2F33a8ffa7-c655-430a-8e66-58e2adaf66f8.jpg" alt="davythedev"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/davythedev/exposing-your-django-project-to-the-internet-using-ngrok-488o" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Exposing Your Django Project to the Internet Using Ngrok&lt;/h2&gt;
      &lt;h3&gt;David Sudi ・ Jan 3&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#django&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#backend&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>django</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>Exposing Your Django Project to the Internet Using Ngrok</title>
      <dc:creator>David Sudi</dc:creator>
      <pubDate>Fri, 03 Jan 2025 17:52:35 +0000</pubDate>
      <link>https://dev.to/davythedev/exposing-your-django-project-to-the-internet-using-ngrok-488o</link>
      <guid>https://dev.to/davythedev/exposing-your-django-project-to-the-internet-using-ngrok-488o</guid>
      <description>&lt;p&gt;Have you ever encountered this error while developing in Django?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You're accessing the development server over HTTPS, but it only supports HTTP.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're used to accessing your development server via &lt;code&gt;http://localhost:8000&lt;/code&gt;, this error can be frustrating - especially after updating firewall rules that enforce HTTPS connections. Instead of reverting security settings, there's a better solution: Ngrok.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Ngrok?
&lt;/h2&gt;

&lt;p&gt;Ngrok is a powerful tool that exposes local applications to the internet without complex network configurations like port forwarding or DNS setup.  Read more about ngrok in their &lt;a href="https://ngrok.com/docs" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;Before we begin, ensure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Django project setup&lt;/li&gt;
&lt;li&gt;Python 3.x installed&lt;/li&gt;
&lt;li&gt;A virtual environment configured&lt;/li&gt;
&lt;li&gt;An ngrok account (free tier works fine)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step-by-Step Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install the pyngrok Package
&lt;/h3&gt;

&lt;p&gt;Before we install anything, activate your virtual environment then install the Python wrapper for ngrok:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;pyngrok
pip freeze &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Configure Django Settings
&lt;/h3&gt;

&lt;p&gt;Add ngrok's domain to your allowed hosts list in your project's &lt;code&gt;settings.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# settings.py
&lt;/span&gt;&lt;span class="n"&gt;ALLOWED_HOSTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;localhost&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;.ngrok-free.app&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows Django to accept requests from ngrok's dynamic URLs (&lt;code&gt;*.ngrok-free.app&lt;/code&gt;). Django will not generate any errors even though we can't predict the random string part of the URL.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Start Your Django Server
&lt;/h3&gt;

&lt;p&gt;In your project's root directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: Windows users can use &lt;code&gt;py manage.py runserver&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Authenticate and Start Ngrok
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sign up at &lt;a href="https://ngrok.com" rel="noopener noreferrer"&gt;ngrok.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Copy your authentication token from your dashboard&lt;/li&gt;
&lt;li&gt;In a new terminal window, authenticate ngrok:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ngrok config add-authtoken YOUR_TOKEN_HERE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start the tunnel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ngrok http 8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Ensure that the ngrok and Django server ports are the same. The default port usually is 8000.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should see output similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Account                       Your Name (Plan: Free)
Version                       3.19.0
Region                       United States (us)
Latency                      Your Latency
Web Interface                An Unsecure HTTP address
Forwarding                   https://[random-id].ngrok-free.app -&amp;gt; http://localhost:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Testing Your Setup
&lt;/h3&gt;

&lt;p&gt;Access your Django application using only the HTTPS URL provided by ngrok on your console window. It will look similar to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://[random-id].ngrok-free.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Other Use Cases for ngrok
&lt;/h2&gt;

&lt;p&gt;Ngrok isn't just for solving HTTPS issues. It's valuable for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick Internet Exposure&lt;/strong&gt;: Share your local development work instantly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Webhook Testing&lt;/strong&gt;: Test integrations that require public URLs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Previews&lt;/strong&gt;: Let clients preview work without deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Device Testing&lt;/strong&gt;: Test your app on multiple devices easily&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Troubleshooting Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check if your ngrok authentication token is properly configured&lt;/li&gt;
&lt;li&gt;Verify that your Django server is running before starting ngrok&lt;/li&gt;
&lt;li&gt;Monitor the ngrok interface for request logs and errors&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Related Resources
&lt;/h2&gt;

&lt;p&gt;Want to learn more about web development? Check out my other articles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/susid/understanding-quality-of-service-qos-3pfm"&gt;Understanding Quality of Service (QoS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/susid/respond-to-me-the-art-of-making-responsive-websites-13kf"&gt;The Art of Making Responsive Websites&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for your time and happy coding! Share your projects in the comments section.&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>webdev</category>
      <category>backend</category>
    </item>
    <item>
      <title>Respond to Me: The Art of Making Responsive Websites</title>
      <dc:creator>David Sudi</dc:creator>
      <pubDate>Thu, 23 Mar 2023 13:20:52 +0000</pubDate>
      <link>https://dev.to/davythedev/respond-to-me-the-art-of-making-responsive-websites-13kf</link>
      <guid>https://dev.to/davythedev/respond-to-me-the-art-of-making-responsive-websites-13kf</guid>
      <description>&lt;p&gt;To provide a satisfactory browsing experience to most global netizens, developers must ensure that their websites are user-friendly, easily accessible, and adaptable to various devices and screen dimensions. How can developers achieve this seemingly Herculean task? By adhering to Responsive Web Design (RWD) principles.&lt;/p&gt;

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

&lt;p&gt;Kindly have an understanding of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic HTML and CSS&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Goal
&lt;/h2&gt;

&lt;p&gt;The article will guide you through the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is RWD?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Factors to consider when creating a responsive website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to add responsiveness to a website.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Definition of terms
&lt;/h3&gt;

&lt;p&gt;Below are some of the technical terms present in the article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Viewport - This is the visible portion of the web page within the browser window. It is the area that a user can see without scrolling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Render - Refers to displaying a web page or application on a user's device.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Breakpoint - The point at which a website's layout or design changes to better fit a different screen size or device type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Polyfill - Code that provides modern functionality to older browsers without natively supporting it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Understanding What Responsive Web Design Is
&lt;/h3&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%2Ft1lct0cjonrehuh0c4jv.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%2Ft1lct0cjonrehuh0c4jv.png" alt="Start of the explanation section" width="331" height="400"&gt;&lt;/a&gt;&lt;br&gt;
RWD is a web design methodology that aims to produce web pages that appear visually appealing on all screen sizes and devices. This article delves into highly recommended factors to consider when creating responsive websites.&lt;/p&gt;
&lt;h3&gt;
  
  
  A. Add Limits to Make The Viewport Responsive
&lt;/h3&gt;

&lt;p&gt;Many browsers render web pages at a fixed width. This can cause horizontal scroll issues for users with smaller devices. To address this, we can add the &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag to the HTML header, which sets the width and scaling of the viewport. The meta tag allows a webpage to adapt to different screen sizes and display properly on devices of varying widths.&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;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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  B. How About Giving Responsive Images a Shot?
&lt;/h3&gt;

&lt;p&gt;Any website that you develop should display consistently on all major devices. It should arouse pleasure and satisfaction for your users as they navigate and read through your content. Your images should load in a snap and be clear. But if you fail on any of these tenets, it will be like serving your friend uncooked food.&lt;/p&gt;

&lt;p&gt;We can use CSS &lt;code&gt;max-width&lt;/code&gt; and &lt;code&gt;object-fit&lt;/code&gt; properties to ensure images respond to different device widths and heights.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;i. The&lt;/strong&gt; &lt;code&gt;max-width&lt;/code&gt; property
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.example-img&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;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="nb"&gt;auto&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;The above rule restricts the browser from rendering an image that exceeds its container's width but preserves the image's aspect ratio by adjusting its height accordingly. The &lt;code&gt;max-width&lt;/code&gt; Property is useful when there is a need to maintain the layout of a site and ensure that an image doesn't overlap with other elements.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;ii. The&lt;/strong&gt; &lt;code&gt;object-fit&lt;/code&gt; Property
&lt;/h4&gt;

&lt;p&gt;The rule directs the browser to either preserve the image's aspect ratio or resize and fill as much space as possible in its container. For instance, we add the value &lt;code&gt;contain&lt;/code&gt; to the &lt;code&gt;object-fit&lt;/code&gt; property to preserve the image's aspect ratio.&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;img&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;200px&lt;/span&gt;
&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;
&lt;span class="c"&gt;/* preserves the image's aspect ratio but resizes it to fit the container */&lt;/span&gt;
&lt;span class="n"&gt;object-fit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;contain&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;Sometimes, you need to have an image that always fills its container without leaving whitespaces. The &lt;code&gt;cover&lt;/code&gt; value will do just that.&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;img&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;200px&lt;/span&gt;
&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;
&lt;span class="c"&gt;/* respects the image's aspect ratio, fills the container but can crop some parts */&lt;/span&gt;
&lt;span class="n"&gt;object-fit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;cover&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;h3&gt;
  
  
  C. Responsive Units Are Better Than Fixed Units
&lt;/h3&gt;

&lt;p&gt;Fixed units, such as pixels (px), remain constant regardless of screen size. These units are useful when developing logos and navigation bars that need to retain a certain size or position on the page.&lt;/p&gt;

&lt;p&gt;Responsive units, such as percentages(%), are calculated relative to the screen size and adjusted accordingly. This makes the units preferable for designing flexible elements that resize proportionally according to their container size and maintain their alignment with other features.&lt;/p&gt;

&lt;p&gt;Instead of using fixed widths like this:&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;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* The container will always take up 960px no matter the type of device */&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;960px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* The column will always take up 480px no matter the type of device */&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;480px&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 fluid widths like this:&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;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* The container will dynamically readjust its width to match the device's width */&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="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.column&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* The column will dynamically readjust to occupy half of its container's width */&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;50%&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;Other responsive units include:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Responsive Unit&lt;/th&gt;
&lt;th&gt;Application&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;They are based on the font size of the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; element.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;em&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;They are relative to the parent font size.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;vh&lt;/code&gt;(Viewport height) &lt;code&gt;vw&lt;/code&gt;(Viewport width)&lt;/td&gt;
&lt;td&gt;They are based on the viewport's size and can be used to create responsive layouts that adjust to the screen or window size.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  D. Unleash the Strength of Media Queries
&lt;/h3&gt;

&lt;p&gt;Media queries are CSS rules that apply distinctive styles depending on various factors, including device screen size, resolution, orientation, and other conditions. We can effortlessly create breakpoints through media queries that dynamically modify the layout or appearance of a website based on the device or screen size.&lt;/p&gt;

&lt;p&gt;It is imperative to adopt a mobile-first design approach during development. This means creating the site for mobile devices before scaling to larger screens.&lt;/p&gt;

&lt;p&gt;The following table outlines the primary device categories and their corresponding breakpoints.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I generally prefer bootstrap's breakpoint standards.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Device&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Breakpoints&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Phones&lt;/td&gt;
&lt;td&gt;Small device&lt;/td&gt;
&lt;td&gt;576px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tablets&lt;/td&gt;
&lt;td&gt;Medium devices&lt;/td&gt;
&lt;td&gt;768px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Laptops&lt;/td&gt;
&lt;td&gt;Large devices&lt;/td&gt;
&lt;td&gt;992px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Desktops&lt;/td&gt;
&lt;td&gt;Extra large devices&lt;/td&gt;
&lt;td&gt;1200px&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Desktops&lt;/td&gt;
&lt;td&gt;Extra-extra large devices&lt;/td&gt;
&lt;td&gt;1400px&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The above standards allow us to design a website that adapts to different devices and is supported by most browsers.&lt;/p&gt;

&lt;p&gt;Explore the sample code below for a comprehensive demonstration of how to apply media queries.&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="c"&gt;/* Smartphones  */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;576px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="nt"&gt;code&lt;/span&gt; &lt;span class="nt"&gt;goes&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Tablets with a screen size of 768px and up */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="nc"&gt;.code&lt;/span&gt; &lt;span class="nt"&gt;goes&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Desktops with a screen size of 992px and up */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;992px&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt; 
  &lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="nc"&gt;.code&lt;/span&gt; &lt;span class="nt"&gt;goes&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Large desktops with a screen size of 1200px and up */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1200px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="nc"&gt;.code&lt;/span&gt; &lt;span class="nt"&gt;goes&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Larger desktops with a screen size of 1400px and up */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1400px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="nc"&gt;.code&lt;/span&gt; &lt;span class="nt"&gt;goes&lt;/span&gt; &lt;span class="nt"&gt;here&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  E. Try Responsive Layouts Like Flexbox and Grid
&lt;/h3&gt;

&lt;p&gt;Modern CSS layout methods such as Flexbox and Grid are powerful tools for creating responsive layouts that adapt to different screen sizes and devices.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;i. Flexbox&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Flexbox is a one-dimensional layout method that allows you to create flexible and responsive layouts. It provides a set of properties enabling us to specify how items should be positioned, aligned, and distributed within a container. With Flexbox, you can easily create layouts that adapt to different screen sizes without using media queries extensively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;//Example of using Flexbox
&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;"item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 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;"item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 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;"item"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&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="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="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item&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;200px&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;150px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f2f2f2&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;10px&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;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="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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we have a container with the &lt;code&gt;display: flex&lt;/code&gt; property set, which turns it into a flex container. The &lt;code&gt;flex-wrap&lt;/code&gt; property wraps the items onto multiple lines as needed. Additionally, the &lt;code&gt;justify-content&lt;/code&gt; property centers the items horizontally within the container. Each item has the &lt;code&gt;display: flex&lt;/code&gt; property set as well, which makes it a flex item. The &lt;code&gt;align-items&lt;/code&gt; and &lt;code&gt;justify-content&lt;/code&gt; properties center the content of each item vertically and horizontally, respectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;ii. Grid&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Grid is a two-dimensional layout method that allows you to create complex and responsive layouts. It provides a grid system enabling us to define rows and columns, and you can place items anywhere in the Grid. With Grid, we can create more flexible and customizable layouts than those made with traditional layout methods like &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/float" rel="noopener noreferrer"&gt;floats&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Example of using Grid:&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;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;"item item1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 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;"item item2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 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;"item item3"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 3&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;"item item4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 4&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;"item item5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 5&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;"item item6"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Item 6&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&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;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="nb"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&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="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;span class="nc"&gt;.item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f2f2f2&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="nc"&gt;.item1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&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="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;grid-row&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="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;grid-row&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="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&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;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&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="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item5&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.item6&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;grid-column&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="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;grid-row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&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;In this example, we turn the container class into a grid container using the &lt;code&gt;display: grid&lt;/code&gt; property. The &lt;code&gt;grid-template-columns&lt;/code&gt; property defines the columns of the Grid, and the &lt;code&gt;grid-gap&lt;/code&gt; property sets the gap between the grid items. Each item has a unique class name and is positioned within the Grid using the &lt;code&gt;grid-column&lt;/code&gt; and &lt;code&gt;grid-row&lt;/code&gt; properties.&lt;/p&gt;

&lt;p&gt;Current web browsers provide full support for Grid and Flexbox. However, to ensure backward compatibility with earlier browser versions, it may be necessary to implement fallback techniques or &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Polyfill" rel="noopener noreferrer"&gt;polyfills&lt;/a&gt; that bring seamless rendering of any design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of RWD
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Improved user experience&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cost-effective development&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Increased reach across devices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduced maintenance efforts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better search engine optimization (SEO)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Easier content management&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Future-proofing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Join the RWD Revolution to Improve your Users' Experience
&lt;/h3&gt;

&lt;p&gt;Creating a responsive website involves various elements that work together to achieve its ultimate objective. Each factor plays a significant role in ensuring the website is responsive and user-friendly. In today's web landscape, responsive web design demands meticulous planning and execution. That's why developers must recognize the importance of implementing responsive web design to achieve optimal results&lt;/p&gt;

&lt;h3&gt;
  
  
  Join the conversation!
&lt;/h3&gt;

&lt;p&gt;I value your feedback and want to hear your thoughts. Leave a comment and let me know what you think about the article. Your insights could inspire new ideas and help shape future content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://storyset.com/online" rel="noopener noreferrer"&gt;Online illustrations by Storyset&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>design</category>
      <category>css</category>
    </item>
    <item>
      <title>Understanding Quality of Service (QoS)</title>
      <dc:creator>David Sudi</dc:creator>
      <pubDate>Sat, 28 May 2022 12:14:46 +0000</pubDate>
      <link>https://dev.to/davythedev/understanding-quality-of-service-qos-3pfm</link>
      <guid>https://dev.to/davythedev/understanding-quality-of-service-qos-3pfm</guid>
      <description>&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before reading any further, I recommend that you should have some understanding on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.fortinet.com/resources/cyberglossary/network-traffic" rel="noopener noreferrer"&gt;Network traffic&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://networklessons.com/quality-of-service/ip-precedence-dscp-values" rel="noopener noreferrer"&gt;IP Packets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.networkworld.com/article/3239677/the-osi-model-explained-and-how-to-easily-remember-its-7-layers.html" rel="noopener noreferrer"&gt;Layers of the OSI model&lt;/a&gt; (focus on layers 2 and 3)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.guru99.com/tcp-vs-udp-understanding-the-difference.html" rel="noopener noreferrer"&gt;UDP and TCP protocols&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://networklessons.com/quality-of-service/ip-precedence-dscp-values" rel="noopener noreferrer"&gt;IP precedence and type of service fields&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Definition of terms
&lt;/h3&gt;

&lt;p&gt;Below are some of the terms you shall encounter through this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Buffers - these are physical storage areas that temporarily hold data as it’s transferred from one location to another.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Jitters - this refers to the delay inconsistency between packets that differs over time when a signal wanes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Latency - latency is the time it takes for a packet to be sent from its source to its destination.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bit rate - the number of bits sent over a network per second.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Packet rate - the number of packets being sent per second.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An ingress queue - it holds packets till a router’s CPU pushes the data to a suitable interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An egress queue - it holds packets that a router serializes onto an Ethernet cable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Understanding Quality of Service (QoS)
&lt;/h3&gt;

&lt;p&gt;Networks have become an important asset in today’s world. Networks allow their users to share files, data, and other types of information. Thus, you can optimize your network to ensure that it performs at its full potential. QoS is an essential set of technologies that allows a user to optimize their network so that it can run at its full potential.&lt;/p&gt;

&lt;p&gt;The importance of having a peak-performing network is it ensures that intensive applications run efficiently due to the availability of adequate network resources. In this article, we will explore what is Quality of Service and its importance to a network.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is QoS
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;QoS&lt;/strong&gt; is a group of technologies that allow a user to manage their network’s traffic, thus guaranteeing the optimum performance of essential applications in their workplace or home. Through QoS, you can be able to prioritize network traffic, control jitters, and lower latency.&lt;/p&gt;

&lt;p&gt;Furthermore, QoS allows you to optimize the performance of specific applications on their network and gain visibility into their network’s bit rate and packet rate. Lastly, you can configure how packets are routed in your network to avoid transmission delays.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does QoS Work
&lt;/h3&gt;

&lt;p&gt;QoS utilizes a set of various techniques to guarantee the optimal performance of critical applications such as VoIP, video conferencing, and online gaming. Some of these techniques are the resource reservation protocol (RSVP), queuing, and traffic marking.  &lt;/p&gt;

&lt;h4&gt;
  
  
  Traffic Marking
&lt;/h4&gt;

&lt;p&gt;QoS works by identifying the various applications or activities that would benefit from managing a network’s traffic. After identifying these applications, QoS marks the specific traffic that needs managing. Marking the network’s traffic allow routers to create separate virtual queues for each application.&lt;/p&gt;

&lt;p&gt;There are various ways in which routers mark network traffic. These ways include Class of Service (CoS) and Differentiated Services Code Point (DSCP).&lt;/p&gt;

&lt;h5&gt;
  
  
  Class of Service (CoS)
&lt;/h5&gt;

&lt;p&gt;Class of service is a 3-bit field found in an Ethernet frame header when one uses the 802.1q networking standard that supports virtual local area networks (VLAN) on an 802.3 Ethernet network.&lt;/p&gt;

&lt;p&gt;CoS marks a network’s traffic at layer two by altering the class of service bits found in frame headers. Adjusting the class of service bits allows QoS to know what traffic to manipulate and how to manipulate the traffic. &lt;/p&gt;

&lt;p&gt;Thus, bandwidth-intensive applications will fall first in the queue as routers will reserve the network’s bandwidth for these applications.&lt;/p&gt;

&lt;h5&gt;
  
  
  Differentiated Service Code Point (DSCP)
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;DSCP&lt;/strong&gt; is a section in an IP packet that assigns varying levels of services to a network’s traffic. Giving varying levels of service is achieved through tagging a DSCP code to each packet on the network and matching it with the equivalent level of service. DSCP marks packets in the layer three packet header.&lt;/p&gt;

&lt;h4&gt;
  
  
  Queuing
&lt;/h4&gt;

&lt;p&gt;Queuing is the process of making policies that provide special treatment to various data streams over others. The process is made possible by utilizing special high-performance memory buffers found in switches and routers called queues.&lt;/p&gt;

&lt;h5&gt;
  
  
  What is a Queue
&lt;/h5&gt;

&lt;p&gt;A &lt;strong&gt;Queue&lt;/strong&gt; is a high-performance buffer in a router or a switch that holds traffic until it can be processed or serialized. Routers and switches have two types of hardware queues, ingress (inbound) and egress (outbound) queues.&lt;/p&gt;

&lt;p&gt;Hardware queues are characterized as standard or strict priority queues. The standard queues treat all traffic as equal. In these queues, no traffic receives special treatment.&lt;/p&gt;

&lt;p&gt;On the contrary, the strict priority queues are dedicated to high priority traffic; thus, QoS-enabled interfaces utilize this type of queue to process high priority packets.&lt;/p&gt;

&lt;h5&gt;
  
  
  How High Priority Traffic is Processed
&lt;/h5&gt;

&lt;p&gt;When routers receive traffic, any packets marked with a higher DSCP or IP value than others are directed into the strict priority queues. &lt;/p&gt;

&lt;p&gt;Here, traffic marked as high priority is processed faster than other traffic, thus increasing your network’s performance and reducing the chances of routers dropping packets during congestion.&lt;/p&gt;

&lt;h4&gt;
  
  
  Resource Reservation Protocol (RSVP)
&lt;/h4&gt;

&lt;p&gt;RSVP is a transport layer protocol that reserves network resources to get varying Quality of Service levels for an application’s data streams. The protocol accomplishes its task by sending out RSVP messages from a source to a receiver and vice versa. &lt;/p&gt;

&lt;p&gt;RSVP messages are classified into two: path and reservation messages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Path messages&lt;/strong&gt; are sent from a source to a receiver by storing the path state at each node in the message’s path. The path states direct a receiver to reserve network resources on each node that it passes on the network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reservation messages&lt;/strong&gt; are sent from a receiver to a sender along the route of the path message. These messages identify the resources required by a data stream.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Importance of QoS
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;It guarantees the optimal performance of applications that need high bandwidth for real-time traffic. &lt;/p&gt;

&lt;p&gt;Applications such as video conferencing applications, VoIP, streaming applications, and online gaming are some of the particular applications that are bandwidth-intensive and highly sensitive to jitters and latency.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;QoS helps prevent delays in sensitive applications operating on a network. These applications usually favor UDP protocol over TCP protocol. The UDP protocol is favored over TCP because packets get transmitted in an ordered stream.&lt;/p&gt;

&lt;p&gt;Furthermore, the UDP protocol differs from the TCP protocol because the protocol does not retransmit data packets that get corrupted or lost during transmission. &lt;/p&gt;

&lt;p&gt;The lack of retransmission in UDP applications creates the need for a QoS-supported network that has low instances of jitters and minimum latency, thus reducing delays that can result in choppy audios in an IP call or sketchy videos in a video stream.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;QoS makes it possible to plan and manage network resources. Planning allows a person to prioritize traffic, applications, data flows, users, and network resources, thus ensuring optimal performance. Additionally, planning reduces costs and the need to invest in link expansion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;QoS enhances the user experience. Since QoS guarantees the optimal performance of critical applications, enterprises that utilize the technology report an increase in employee performance and satisfaction. This results in tasks being completed to the required standards and in due time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this article, we learned what Quality of Service (QoS) is, how QoS utilizes techniques such as traffic marking, queuing, and the resource reservation protocol to guarantee the optimal performance of critical applications on a network.&lt;/p&gt;

&lt;p&gt;Additionally, we learned the importance of having QoS enabled on a network. I consider QoS as an essential technology that should be in-built into any router or switch that will be produced in the future. I found learning about these technologies to be fascinating. I hope you gained some insight on how you can speed up your network without the need to upgrade your network's bandwidth.&lt;/p&gt;

&lt;p&gt;Until next time, happy reading!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
