<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Abdiel Wilson</title>
    <description>The latest articles on Forem by Abdiel Wilson (@abdielwilsn).</description>
    <link>https://forem.com/abdielwilsn</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%2F1718477%2Fc29790a3-7a68-49d7-8073-20e71c316beb.jpeg</url>
      <title>Forem: Abdiel Wilson</title>
      <link>https://forem.com/abdielwilsn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abdielwilsn"/>
    <language>en</language>
    <item>
      <title>PHP Memory Management Explained Simply – A Beginner-Friendly Guide (2025 Edition)</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Thu, 20 Nov 2025 06:52:21 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/php-memory-management-explained-simply-a-beginner-friendly-guide-2025-edition-npn</link>
      <guid>https://forem.com/abdielwilsn/php-memory-management-explained-simply-a-beginner-friendly-guide-2025-edition-npn</guid>
      <description>&lt;p&gt;You’ve probably seen this scary error at least once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fatal error: Allowed memory size of 134217728 bytes exhausted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In plain English: “Your PHP script used too much memory and crashed.”&lt;/p&gt;

&lt;p&gt;This article will explain how PHP handles memory, why it runs out so easily, and — most importantly — how to fix it forever using simple, modern techniques.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. How PHP Uses Memory (The Simple Explanation)
&lt;/h3&gt;

&lt;p&gt;Every variable in PHP ($name, $users, $fileContent, etc.) takes up space in RAM.&lt;br&gt;&lt;br&gt;
PHP is actually very efficient most of the time — it shares memory between variables until one of them changes (this is called copy-on-write).&lt;/p&gt;

&lt;p&gt;But when you do something big — like loading 100,000 database records or reading a large file — PHP can suddenly eat hundreds of megabytes in seconds.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. The Most Common Memory Mistakes (And How to Spot Them)
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Mistake 1: Loading All Database Records at Once
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Loads EVERY user into memory&lt;/span&gt;
&lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// send email&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you have 100,000 users, this can easily use 300–600 MB of RAM → crash!&lt;/p&gt;
&lt;h4&gt;
  
  
  Mistake 2: Reading Large Files Completely
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;file_get_contents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'customers-200mb.csv'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="c1"&gt;// A 200 MB file can become 800+ MB in memory!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Mistake 3: Storing Too Much Data in Arrays
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$cache&lt;/span&gt; &lt;span class="o"&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="nv"&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="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;500000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&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="nv"&gt;$cache&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generateBigReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Memory keeps growing&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3. The Right Way: Modern Solutions That Actually Work
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Solution 1: Use Generators (Your New Best Friend)
&lt;/h4&gt;

&lt;p&gt;A generator is like a conveyor belt — it gives you one item at a time instead of dumping everything at once.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Laravel example – stays under 20 MB even with millions of records&lt;/span&gt;
&lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Mail&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WelcomeMail&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Only ONE user in memory at a time!&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Plain PHP version for CSV files&lt;/span&gt;
&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;readLargeCsv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$path&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;Generator&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$handle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;fopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'r'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;$row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;fgetcsv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// One row at a time&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nb"&gt;fclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Use it&lt;/span&gt;
&lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;readLargeCsv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'huge-file.csv'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Process one row → memory stays tiny&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Solution 2: Process Files in Small Chunks
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;fopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'big-log.txt'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'r'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;feof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$chunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;fread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8192&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Read only 8KB at a time&lt;/span&gt;
    &lt;span class="c1"&gt;// Process $chunk&lt;/span&gt;
    &lt;span class="k"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$chunk&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Free memory immediately&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;fclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$handle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Solution 3: Use Redis Instead of PHP Arrays for Big Data
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Wrong – eats server RAM&lt;/span&gt;
&lt;span class="nv"&gt;$bigCache&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

&lt;span class="c1"&gt;// Correct – stored outside PHP&lt;/span&gt;
&lt;span class="nc"&gt;Cache&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'daily-report'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;addHours&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. How to Check Memory Usage in Your Code
&lt;/h3&gt;

&lt;p&gt;Add these lines anywhere to see what’s happening:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Current memory: "&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;memory_get_usage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;" MB&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Peak memory: "&lt;/span&gt;    &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;memory_get_peak_usage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;" MB&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Golden Rules Every PHP Developer Should Follow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Never use Model::all() for bulk operations → use cursor() or lazy()&lt;/li&gt;
&lt;li&gt;Never use file_get_contents() on large files → use fopen() + chunks&lt;/li&gt;
&lt;li&gt;Never cache large datasets in PHP arrays → use Redis or database&lt;/li&gt;
&lt;li&gt;Always unset large variables when done&lt;/li&gt;
&lt;li&gt;Run gc_collect_cycles() after heavy operations&lt;/li&gt;
&lt;li&gt;Test with real-sized data (not just 10 records!)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Real Example: Import 1 Million Rows Safely
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;importUsers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$csvFile&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&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="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;readLargeCsv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$csvFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
            &lt;span class="s1"&gt;'name'&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s1"&gt;'email'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="s1"&gt;'phone'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;]);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;10000&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="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Processed &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt; users | Memory: "&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; 
                 &lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;memory_get_usage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;" MB&lt;/span&gt;&lt;span class="se"&gt;\n&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;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script can run for hours and never use more than ~20 MB of RAM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;PHP itself is not a memory hog — bad code is.&lt;/p&gt;

&lt;p&gt;Once you start using generators and chunking, memory errors become a thing of the past. Your applications will handle millions of records smoothly, your server will stay happy, and you’ll sleep better at night.&lt;/p&gt;

&lt;p&gt;Start applying these patterns today. Your future self (and your hosting provider) will thank you.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>performance</category>
      <category>php</category>
    </item>
    <item>
      <title>Managing Laravel Queues with systemd (Instead of Supervisor)</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Thu, 02 Oct 2025 22:13:01 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/managing-laravel-queues-with-systemd-instead-of-supervisor-1i2a</link>
      <guid>https://forem.com/abdielwilsn/managing-laravel-queues-with-systemd-instead-of-supervisor-1i2a</guid>
      <description>&lt;p&gt;If you’ve ever worked with Laravel queues, you know one thing for sure:&lt;/p&gt;

&lt;p&gt;👉 in production, you &lt;em&gt;need something to keep them running&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Without a process manager, your &lt;code&gt;php artisan queue:work&lt;/code&gt; will eventually die, and you’ll be stuck restarting it manually.&lt;/p&gt;

&lt;p&gt;For a long time, I (like many developers) defaulted to &lt;strong&gt;Supervisor&lt;/strong&gt; for this job. But recently I explored another option: &lt;strong&gt;systemd&lt;/strong&gt; — and honestly, it’s clean, simple, and already built into most Linux distros.&lt;/p&gt;

&lt;p&gt;Let’s walk through how you can set up systemd to manage your Laravel queues.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why systemd?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Already part of most Linux servers (no extra install needed)&lt;/li&gt;
&lt;li&gt;✅ Can automatically restart your queue worker if it crashes&lt;/li&gt;
&lt;li&gt;✅ Starts queue workers on boot&lt;/li&gt;
&lt;li&gt;✅ Built-in logging via &lt;code&gt;journalctl&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✅ Fewer moving parts compared to Supervisor&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1: Create a systemd service file
&lt;/h2&gt;

&lt;p&gt;We’ll create a service definition for our Laravel queue worker.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/systemd/system/laravel-queue.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste in the following configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Unit]&lt;/span&gt;
&lt;span class="py"&gt;Description&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;Laravel Queue Worker&lt;/span&gt;
&lt;span class="py"&gt;After&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;network.target&lt;/span&gt;

&lt;span class="nn"&gt;[Service]&lt;/span&gt;
&lt;span class="py"&gt;User&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;www-data&lt;/span&gt;
&lt;span class="py"&gt;Restart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;always&lt;/span&gt;
&lt;span class="py"&gt;ExecStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/usr/bin/php /path/to/your/laravel/artisan queue:work --tries=3 --sleep=3&lt;/span&gt;

&lt;span class="nn"&gt;[Install]&lt;/span&gt;
&lt;span class="py"&gt;WantedBy&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Explanation:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User=www-data&lt;/strong&gt; → Runs the queue worker under the web server user (change if needed).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restart=always&lt;/strong&gt; → Ensures the process restarts if it crashes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ExecStart&lt;/strong&gt; → The actual command that runs your queue worker. Update the path to match your Laravel app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WantedBy=multi-user.target&lt;/strong&gt; → Ensures it starts with the system at boot.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 2: Reload systemd and enable the service
&lt;/h2&gt;

&lt;p&gt;After saving the file, reload systemd so it picks up the new service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;laravel-queue
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start laravel-queue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Manage your queue worker
&lt;/h2&gt;

&lt;p&gt;Now you can use standard &lt;code&gt;systemctl&lt;/code&gt; commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status laravel-queue   &lt;span class="c"&gt;# Check status&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart laravel-queue  &lt;span class="c"&gt;# Restart worker&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl stop laravel-queue     &lt;span class="c"&gt;# Stop worker&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And check logs with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; laravel-queue &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will stream logs from your queue worker in real-time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Scale it up (Optional)
&lt;/h2&gt;

&lt;p&gt;If you want multiple workers, you can use &lt;strong&gt;systemd templates&lt;/strong&gt;. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/systemd/system/laravel-queue@.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start laravel-queue@1
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start laravel-queue@2
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start laravel-queue@3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each one runs independently, and you can scale up as needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Supervisor vs systemd
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Supervisor&lt;/th&gt;
&lt;th&gt;systemd&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Install required&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;❌ No (already included)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto restart&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logging&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Yes (journalctl)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaling workers&lt;/td&gt;
&lt;td&gt;✅ Easy&lt;/td&gt;
&lt;td&gt;✅ Easy with templates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Startup on boot&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complexity&lt;/td&gt;
&lt;td&gt;Higher&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you’re already comfortable with Supervisor, it works great. But if you want fewer dependencies and tighter integration with your OS, &lt;strong&gt;systemd is a solid choice.&lt;/strong&gt;&lt;/p&gt;




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

&lt;p&gt;Laravel queues are essential for background jobs, but keeping them alive in production is just as important.&lt;/p&gt;

&lt;p&gt;While Supervisor has been the go-to for years, &lt;strong&gt;systemd provides a simpler, more native approach&lt;/strong&gt; to managing queue workers.&lt;/p&gt;

&lt;p&gt;Next time you’re deploying a Laravel app, give systemd a try. You might not look back. 🚀&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>laravel</category>
      <category>devops</category>
      <category>linux</category>
    </item>
    <item>
      <title>🚀 No-Code Development Tools: Build Cool Stuff Without Writing a Line of Code (Well…Almost)</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Tue, 24 Jun 2025 09:24:33 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/no-code-development-tools-build-cool-stuff-without-writing-a-line-of-code-wellalmost-1bmn</link>
      <guid>https://forem.com/abdielwilsn/no-code-development-tools-build-cool-stuff-without-writing-a-line-of-code-wellalmost-1bmn</guid>
      <description>&lt;p&gt;So you’ve got this genius app idea brewing in your head, right? Maybe it’s a booking platform, a sneaker reselling dashboard, a marketplace for alpaca wool (hey, no judgment). But here’s the catch: you don’t know how to code. Or maybe you do, but spinning up another full-stack project from scratch feels like punishment. Either way, you’re in luck, welcome to the world of &lt;strong&gt;No-Code&lt;/strong&gt; development tools.&lt;/p&gt;

&lt;p&gt;These platforms let you &lt;em&gt;build&lt;/em&gt; stuff. Real, functional, beautiful digital products, without wrestling with semicolons or yelling at your terminal at 2AM. And honestly? No-code isn’t just a shortcut. It’s a mindset shift.&lt;/p&gt;

&lt;p&gt;Let’s talk about it.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Wait, What &lt;em&gt;Is&lt;/em&gt; No-Code?
&lt;/h2&gt;

&lt;p&gt;No-code tools are platforms that give you visual drag-and-drop interfaces to build software. Instead of writing code, you’re piecing together logic, connecting APIs, designing interfaces, and launching actual apps or workflows—faster than you can say “npm install.”&lt;/p&gt;

&lt;p&gt;It’s kind of like playing with LEGO bricks, except the bricks are databases, automations, and UI components. You’re not compromising on quality either, some of the biggest startups today started out with no-code MVPs.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ The Toolbelt: Popular No-Code Tools Worth Checking Out
&lt;/h2&gt;

&lt;p&gt;There’s a sea of tools out there, but here are a few that slap:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Webflow&lt;/strong&gt; – &lt;em&gt;The Designer’s Playground&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Webflow is what you get when Figma and HTML/CSS have a brilliant child. You can build pixel-perfect websites with full control over responsiveness, interactions, and even CMS functionality, all without writing a single line of code (but if you &lt;em&gt;want&lt;/em&gt; to write custom code, you can).&lt;/p&gt;

&lt;p&gt;Use it for: Portfolios, landing pages, marketing sites, CMS-powered blogs.&lt;/p&gt;

&lt;p&gt;Bonus: The animations and transitions you can pull off with Webflow? Chef’s kiss.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Bubble&lt;/strong&gt; – &lt;em&gt;Build a Full App. Seriously.&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Bubble is basically your backend and frontend wrapped in one sleek package. Want to build a marketplace? A SaaS dashboard? An Instagram clone? Bubble says, “Let’s go.”&lt;/p&gt;

&lt;p&gt;You set up your database visually, define your app logic with workflows, and design your UI in the same place. There’s a bit of a learning curve...but once you get the hang of it, it’s a superpower.&lt;/p&gt;

&lt;p&gt;Use it for: MVPs, internal tools, full-fledged web apps.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Airtable&lt;/strong&gt; – &lt;em&gt;Google Sheets on Steroids&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;If Google Sheets went to the gym, read some self-help books, and got a glow-up, it would be Airtable.&lt;/p&gt;

&lt;p&gt;It’s a database that feels like a spreadsheet but acts like an app. You can use it to track anything-inventory, leads, bug reports, ideas, your gym progress (ha)—and then turn that data into Kanban boards, calendars, or even dashboards.&lt;/p&gt;

&lt;p&gt;Use it for: Lightweight CRMs, project trackers, collaborative databases.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;Zapier / Make (formerly Integromat)&lt;/strong&gt; – &lt;em&gt;Automation, Baby!&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;These tools let you connect your apps together so they can talk behind your back and do things automatically. Think “When someone fills a form on my site, send a Slack message, add them to Airtable, and email them a unicorn GIF.”&lt;/p&gt;

&lt;p&gt;You’re building logic visually, like LEGO Technic but for the internet.&lt;/p&gt;

&lt;p&gt;Use it for: Workflows, business automations, integrations between apps.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;Glide&lt;/strong&gt; – &lt;em&gt;Turn a Google Sheet Into an App&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Seriously. Take a Google Sheet, plug it into Glide, and boom—you’ve got a mobile app. It’s magic.&lt;/p&gt;

&lt;p&gt;Perfect for internal tools, client dashboards, or turning side hustles into mobile apps without spinning up Firebase and getting grey hair.&lt;/p&gt;

&lt;p&gt;Use it for: Quick internal apps, data-based mobile projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  😎 Why No-Code Is Actually Cool (Not Just Lazy)
&lt;/h2&gt;

&lt;p&gt;People used to look down on no-code as "lesser" development. But let’s be real: &lt;strong&gt;speed&lt;/strong&gt; wins.&lt;/p&gt;

&lt;p&gt;Here’s why no-code is the future:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Idea to MVP in days, not months&lt;/strong&gt;&lt;br&gt;
You can test your idea &lt;em&gt;now&lt;/em&gt;. No more 6-month dev timelines and ghosting co-founders.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No gatekeeping&lt;/strong&gt;&lt;br&gt;
Designers, marketers, founders, teens with a Chromebook—anyone can build.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It's not all or nothing&lt;/strong&gt;&lt;br&gt;
You can start no-code, then add code later. Many tools let you extend with JavaScript, APIs, or custom plugins.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Focus on what matters&lt;/strong&gt;&lt;br&gt;
Instead of fighting React state bugs, you’re thinking about user experience and business logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 But Is It For &lt;em&gt;Real&lt;/em&gt; Developers?
&lt;/h2&gt;

&lt;p&gt;Yup. And here’s the secret: a lot of pro devs are using no-code tools too, because &lt;strong&gt;time is money&lt;/strong&gt; and no one wants to reinvent the CRUD wheel.&lt;/p&gt;

&lt;p&gt;Need a quick dashboard? Airtable + Softr.&lt;br&gt;
Want an internal admin panel? Retool.&lt;br&gt;
Client needs a prototype in 3 days? Bubble.&lt;/p&gt;

&lt;p&gt;Think of it like power tools. You &lt;em&gt;could&lt;/em&gt; build a table with a hand saw, but why would you when you’ve got a jigsaw?&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 Real Use Case: From Idea to App in 1 Weekend
&lt;/h2&gt;

&lt;p&gt;Let’s say you want to build a platform where local food vendors in your town can list their dishes, and customers can order for pickup.&lt;/p&gt;

&lt;p&gt;You could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design the interface in &lt;strong&gt;Figma&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Build the frontend and backend in &lt;strong&gt;Bubble&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Store vendor info in &lt;strong&gt;Airtable&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Automate order confirmations with &lt;strong&gt;Zapier&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Launch a landing page with &lt;strong&gt;Webflow&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this, "zero code". You’d have a functional MVP ready to test in less time than it takes to binge-watch a Netflix season.&lt;/p&gt;

&lt;p&gt;And when it starts growing? You can either scale with the same stack or hand it off to developers to rebuild in code. You lose nothing.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚫 But Here’s the Caveat (Because There’s Always One)
&lt;/h2&gt;

&lt;p&gt;No-code doesn’t mean &lt;strong&gt;no thinking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You still need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logic flows&lt;/li&gt;
&lt;li&gt;Database relationships&lt;/li&gt;
&lt;li&gt;UX design&lt;/li&gt;
&lt;li&gt;User journeys&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll run into limitations too, performance bottlenecks, complex edge cases, or weird platform bugs. That’s where low-code or custom dev might step in. But don’t let that stop you. The goal isn’t &lt;em&gt;perfect&lt;/em&gt;. The goal is &lt;em&gt;real&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧨 So… Should You Try It?
&lt;/h2&gt;

&lt;p&gt;Yes. Whether you’re a startup founder, freelance designer, high-school hacker, or just someone who wants to &lt;em&gt;build cool stuff&lt;/em&gt;, no-code tools are your fast track.&lt;/p&gt;

&lt;p&gt;You’ll feel that rush—the same one devs get when they run &lt;code&gt;npm start&lt;/code&gt; and see their app come to life. But you’ll get there faster. And hey, time saved = more snacks.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Final Thoughts (a.k.a. TL;DR)
&lt;/h2&gt;

&lt;p&gt;No-code isn’t cheating.&lt;/p&gt;

&lt;p&gt;It’s unlocking the creative, builder energy that lives in everyone, even if you can’t write a &lt;code&gt;for&lt;/code&gt; loop. The next time you have an idea that won’t leave your brain? Don’t overthink it. Open Bubble, fire up Airtable, and build something cool this weekend.&lt;/p&gt;

&lt;p&gt;Because in the end, &lt;strong&gt;builders build&lt;/strong&gt;—whether it’s with code or with clicks.&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Dual-Boot Arch Linux (UEFI) with Windows 10</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Wed, 30 Apr 2025 15:32:45 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/dual-boot-arch-linux-uefi-with-windows-10-23k4</link>
      <guid>https://forem.com/abdielwilsn/dual-boot-arch-linux-uefi-with-windows-10-23k4</guid>
      <description>&lt;h2&gt;
  
  
  1. Pre-Installation Preparation
&lt;/h2&gt;

&lt;p&gt;Before touching partitions, back up any important files from your Windows system. Verify that Windows is installed in UEFI mode: in Windows press Win+R, run &lt;code&gt;msinfo32&lt;/code&gt;, and ensure &lt;strong&gt;BIOS Mode&lt;/strong&gt; is “UEFI” (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=,Windows%20boots%20in%20UEFI%2FGPT%20mode" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;). Also confirm Windows uses GPT, not MBR, in Disk Management. Next, disable “Fast Startup” in Windows (via Control Panel → Power Options) because it hibernates the disk and can block Linux from mounting it (&lt;a href="https://unix.stackexchange.com/questions/477733/is-it-necessary-to-disable-fast-boot-in-windows-to-dual-boot-with-linuxefistub#:~:text=On%20the%20other%20hand%2C%20the,have%20not%20been%20cleanly%20unmounted" rel="noopener noreferrer"&gt;Is it necessary to disable Fast Boot in Windows to dual boot with linux(EFISTUB)? - Unix &amp;amp; Linux Stack Exchange&lt;/a&gt;). In your PC’s UEFI/BIOS settings, disable Secure Boot if possible (this avoids bootloader signature issues) and &lt;strong&gt;Fast Boot&lt;/strong&gt; (if present, to ensure the USB can boot). &lt;/p&gt;

&lt;p&gt;Download the Arch Linux ISO from the official site and create a bootable USB. For example, use a tool like Rufus on Windows: select the ISO, set the partition scheme to GPT and file system to FAT32, and flash it (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=Make%20a%20bootable%20USB" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;). This makes the USB UEFI-bootable. When done, reboot and enter your firmware’s boot menu (often by pressing a key like F12, F10, or Esc during startup) and choose the USB under UEFI devices (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=Boot%20the%20USB" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;). &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Booting Arch Linux in UEFI Mode
&lt;/h2&gt;

&lt;p&gt;Boot the USB in UEFI mode. You should land at an Arch Linux prompt (typically as the &lt;code&gt;root&lt;/code&gt; user, no password). If needed, set your keyboard layout (e.g. &lt;code&gt;loadkeys us&lt;/code&gt; for US layout) and verify network connectivity next. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. Internet Connection (Wi-Fi)
&lt;/h2&gt;

&lt;p&gt;If you have a wired connection, it usually connects automatically via DHCP. Test it with &lt;code&gt;ping -c 3 archlinux.org&lt;/code&gt;. For Wi-Fi, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rfkill unblock wifi 
iw dev        &lt;span class="c"&gt;# identify your wireless interface name (e.g. wlan0)&lt;/span&gt;
wifi-menu wlan0   &lt;span class="c"&gt;# (or your interface name) to select and connect to a network&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After connecting, verify with &lt;code&gt;ping -c 3 archlinux.org&lt;/code&gt;. A working connection is required for package installation (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=Hookup%20them%20internets" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;). &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Disk Partitioning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;WARNING:&lt;/strong&gt; Be careful not to delete your Windows partitions. You may have already shrunk the Windows partition from Windows Disk Management to make free space. If not, reboot into Windows, open Disk Management (&lt;code&gt;diskmgmt.msc&lt;/code&gt;), right-click the Windows (C:) partition, and choose &lt;strong&gt;Shrink Volume&lt;/strong&gt; to free up at least ~20–50 GB (20000–50000 MB) for Arch (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=Shrink%20the%20Windows%20partition" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Back in Arch’s live environment, list disks with &lt;code&gt;fdisk -l&lt;/code&gt; to identify your drive (e.g. &lt;code&gt;/dev/sda&lt;/code&gt;). Use &lt;code&gt;cfdisk&lt;/code&gt; (or &lt;code&gt;fdisk&lt;/code&gt;/&lt;code&gt;gdisk&lt;/code&gt;) to partition. Select your disk (e.g. &lt;code&gt;/dev/sda&lt;/code&gt;) and a &lt;strong&gt;GPT&lt;/strong&gt; label:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cfdisk /dev/sda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the cfdisk menu, create new partitions in the free space:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EFI System Partition (ESP):&lt;/strong&gt; If Windows is already in UEFI mode, an EFI partition (around 100–500 MB, FAT32) should exist (often &lt;code&gt;/dev/sda1&lt;/code&gt;). &lt;em&gt;We will reuse that&lt;/em&gt; for the bootloader.  If not present, create a new small (e.g. 500 MB) FAT32 partition and set its type to “EFI System” (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Let%E2%80%99s%20start%20creating%20a%20disk,%E2%80%9D" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swap Partition:&lt;/strong&gt; Create a Linux swap partition. For example, if you have 8 GB RAM, make 8–12 GB here. After selecting “New”, accept the defaults to start at free space and enter the size (e.g. &lt;code&gt;12G&lt;/code&gt;), then set its type to “Linux swap” (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Now%2C%20let%E2%80%99s%20move%20on%20and,%E2%80%9D" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root Partition:&lt;/strong&gt; Use the remaining space to create an ext4 root partition. Again select “New”, accept the remaining free space, and set the type to “Linux filesystem” (ID 8300) (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Finally%2C%20you%20must%20create%20the,%E2%80%9D" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Write the changes (“Write” in cfdisk) and confirm. Then quit cfdisk (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Next%2C%20you%20need%20to%20save,%E2%80%9D" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Format and Mount Partitions
&lt;/h2&gt;

&lt;p&gt;Format each partition to its filesystem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkfs.fat &lt;span class="nt"&gt;-F32&lt;/span&gt; /dev/sda1     &lt;span class="c"&gt;# Format EFI partition as FAT32 (if newly created; skip if reusing Windows EFI)&lt;/span&gt;
mkswap /dev/sda2            &lt;span class="c"&gt;# Format swap partition&lt;/span&gt;
swapon /dev/sda2            &lt;span class="c"&gt;# Enable swap&lt;/span&gt;
mkfs.ext4 /dev/sda3         &lt;span class="c"&gt;# Format root partition as ext4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Adjust &lt;code&gt;/dev/sdXN&lt;/code&gt; numbers to match your EFI, swap, and root partitions.) Format and activate swap as shown (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=It%E2%80%99s%20time%20now%20to%20format,create%20a%20FAT32%20file%20system" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;); format root as ext4 (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Lastly%2C%20for%20the%20root%20partition,create%20an%20ext4%20file%20system" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Next, mount the new root partition and EFI partition (bootloader space). For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mount /dev/sda3 /mnt       &lt;span class="c"&gt;# Mount the root partition&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/boot/efi     &lt;span class="c"&gt;# Create a mount point for EFI&lt;/span&gt;
mount /dev/sda1 /mnt/boot/efi  &lt;span class="c"&gt;# Mount the EFI (ESP) here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(This assumes &lt;code&gt;/dev/sda1&lt;/code&gt; is the EFI; use the correct device.) These commands are analogous to those shown in the guide (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=First%2C%20we%20must%20mount%20the,we%20can%20perform%20any%20installation" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;). Verify with &lt;code&gt;lsblk&lt;/code&gt; that &lt;code&gt;/mnt&lt;/code&gt; is your root and &lt;code&gt;/mnt/boot/efi&lt;/code&gt; is your EFI. &lt;/p&gt;

&lt;h2&gt;
  
  
  6. Install the Base System
&lt;/h2&gt;

&lt;p&gt;Install the core Arch system packages using &lt;code&gt;pacstrap&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacstrap /mnt base linux linux-firmware
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs the base filesystem, the Linux kernel, and firmware for common devices (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=pacstrap%20%2Fmnt%20base%20linux%20linux" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). You can also add packages like &lt;code&gt;base-devel&lt;/code&gt; or a text editor here (e.g. &lt;code&gt;nano&lt;/code&gt;) as needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Configure the New System
&lt;/h2&gt;

&lt;p&gt;Generate an fstab file so the system knows where to mount partitions on boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;genfstab &lt;span class="nt"&gt;-U&lt;/span&gt; /mnt &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /mnt/etc/fstab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review it with &lt;code&gt;cat /mnt/etc/fstab&lt;/code&gt; to ensure it lists your root and EFI partitions correctly (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=6a,disk%20partitions%20should%20be%20mounted" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Now enter the new system environment with &lt;code&gt;arch-chroot&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;arch-chroot /mnt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You are now effectively “root” in your installed system. All following commands apply inside the new Arch system. &lt;/p&gt;

&lt;h3&gt;
  
  
  Timezone and Clock
&lt;/h3&gt;

&lt;p&gt;Set your timezone, for example for New York:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sf&lt;/span&gt; /usr/share/zoneinfo/America/New_York /etc/localtime
hwclock &lt;span class="nt"&gt;--systohc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This links the appropriate zoneinfo file and generates &lt;code&gt;/etc/adjtime&lt;/code&gt; (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=6c,zone%20by%20running" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;) (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=hwclock%20" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). Replace the path with your region/city. &lt;/p&gt;

&lt;h3&gt;
  
  
  Locale
&lt;/h3&gt;

&lt;p&gt;Edit &lt;code&gt;/etc/locale.gen&lt;/code&gt;, uncomment your locale (e.g. &lt;code&gt;en_US.UTF-8 UTF-8&lt;/code&gt;), then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;locale-gen
&lt;span class="nb"&gt;echo &lt;/span&gt;&lt;span class="nv"&gt;LANG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8 &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/locale.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands (and uncommenting the locale) are shown in the guide (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=vim%20%2Fetc%2Flocale" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;) (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=vim%20etc%2Flocale" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). This sets the system language. &lt;/p&gt;

&lt;h3&gt;
  
  
  Hostname and Hosts
&lt;/h3&gt;

&lt;p&gt;Set a hostname by creating &lt;code&gt;/etc/hostname&lt;/code&gt; with your chosen name. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"archpc"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/hostname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then edit &lt;code&gt;/etc/hosts&lt;/code&gt; and add lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1   localhost
::1         localhost
127.0.1.1   archpc.localdomain   archpc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;archpc&lt;/code&gt; with your hostname as shown (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=vim%20%2Fetc%2Fhostname" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). &lt;/p&gt;

&lt;h3&gt;
  
  
  Root Password and Initramfs
&lt;/h3&gt;

&lt;p&gt;Set the root password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter a secure password when prompted (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=6p,user%20using%20the%20passwd%20command" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;). Then rebuild the initial ramdisk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkinitcpio &lt;span class="nt"&gt;-P&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures the boot image is up-to-date (most tutorials include this step). &lt;/p&gt;

&lt;h3&gt;
  
  
  Create a Regular User (optional but recommended)
&lt;/h3&gt;

&lt;p&gt;Create a normal user for daily use and add it to the “wheel” group (for sudo). For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-G&lt;/span&gt; wheel &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/bash username
passwd username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give that user a password. Then install and enable sudo by editing &lt;code&gt;/etc/sudoers&lt;/code&gt; with &lt;code&gt;EDITOR=nano visudo&lt;/code&gt; and uncommenting the line &lt;code&gt;%wheel ALL=(ALL) ALL&lt;/code&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  8. Install the Bootloader (GRUB)
&lt;/h2&gt;

&lt;p&gt;Install GRUB with UEFI support so you can boot Arch (and Windows). First, install the packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; grub efibootmgr os-prober
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;os-prober&lt;/code&gt; helps detect Windows. Now install GRUB to the EFI directory and generate its config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grub-install &lt;span class="nt"&gt;--target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x86_64-efi &lt;span class="nt"&gt;--efi-directory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/boot/efi &lt;span class="nt"&gt;--bootloader-id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;GRUB
grub-mkconfig &lt;span class="nt"&gt;-o&lt;/span&gt; /boot/grub/grub.cfg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands create the GRUB UEFI entry (&lt;a href="https://www.tecmint.com/arch-linux-installation-and-configuration-guide/#:~:text=mount%20%2Fdev%2Fsda1%20%2Fboot%2FEFI%20%20,FAT32%20EFI%20partition" rel="noopener noreferrer"&gt;How to Install &amp;amp; Configure Arch Linux on UEFI Systems&lt;/a&gt;) (&lt;a href="https://www.tecmint.com/arch-linux-installation-and-configuration-guide/#:~:text=command" rel="noopener noreferrer"&gt;How to Install &amp;amp; Configure Arch Linux on UEFI Systems&lt;/a&gt;). If everything works, &lt;code&gt;/boot/grub/grub.cfg&lt;/code&gt; will be generated and should include menu entries for both Arch and Windows. (If Windows is not listed, ensure &lt;code&gt;os-prober&lt;/code&gt; was installed and re-run &lt;code&gt;grub-mkconfig&lt;/code&gt;.) &lt;/p&gt;

&lt;h2&gt;
  
  
  9. Install KDE Plasma and SDDM
&lt;/h2&gt;

&lt;p&gt;If you want a graphical desktop, install KDE Plasma and its apps. For a full set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; plasma-meta kde-applications-meta
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pulls in the KDE desktop environment and standard KDE apps (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Below%2C%20I%E2%80%99ll%20show%20you%20how,which%20desktop%20environment%20reigns%20supreme" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;). You may also install a graphical display server (&lt;code&gt;xorg&lt;/code&gt;) if not already installed. &lt;/p&gt;

&lt;p&gt;Enable the SDDM display/login manager (default for KDE) and networking (using NetworkManager, since you used NetworkManager earlier):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;sddm
systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;NetworkManager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures KDE’s login screen and network service start at boot (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Finally%2C%20enable%20the%20SDDM%20,start%20automatically%20at%20system%20boot" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;). (You could also use &lt;code&gt;dhcpcd&lt;/code&gt; or another network service if you prefer.)&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Finalize and Reboot
&lt;/h2&gt;

&lt;p&gt;Exit the chroot, unmount partitions, and reboot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;exit
&lt;/span&gt;umount &lt;span class="nt"&gt;-R&lt;/span&gt; /mnt
reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove the USB drive when the system shuts down. On reboot, you should see the GRUB menu offering Arch Linux and Windows. Select Arch to boot into your new system with KDE. Log in as your new user or root (depending on setup) and enjoy Arch Linux! (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=12,Done" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Common Pitfalls:&lt;/em&gt; Be careful not to overwrite the Windows partitions. Always confirm device names (&lt;code&gt;/dev/sdX&lt;/code&gt;) before formatting. If GRUB doesn’t show Windows, ensure &lt;code&gt;os-prober&lt;/code&gt; is installed and rerun &lt;code&gt;grub-mkconfig&lt;/code&gt;. Disabling Fast Startup in Windows is essential; otherwise Linux will refuse to mount the Windows drive (&lt;a href="https://unix.stackexchange.com/questions/477733/is-it-necessary-to-disable-fast-boot-in-windows-to-dual-boot-with-linuxefistub#:~:text=On%20the%20other%20hand%2C%20the,have%20not%20been%20cleanly%20unmounted" rel="noopener noreferrer"&gt;Is it necessary to disable Fast Boot in Windows to dual boot with linux(EFISTUB)? - Unix &amp;amp; Linux Stack Exchange&lt;/a&gt;). Ensure your firmware is booting in UEFI mode (not legacy) for both OSes, or the dual-boot will fail. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; Steps adapted from the official Arch Wiki and community guides (&lt;a href="https://www.liquidweb.com/blog/arch-linux-installation-guide/#:~:text=pacstrap%20%2Fmnt%20base%20linux%20linux" rel="noopener noreferrer"&gt;Comprehensive Arch Linux Installation Guide | Liquid Web&lt;/a&gt;) (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=It%E2%80%99s%20time%20now%20to%20format,create%20a%20FAT32%20file%20system" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;) (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Let%E2%80%99s%20start%20creating%20a%20disk,%E2%80%9D" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;) (&lt;a href="https://www.tecmint.com/arch-linux-installation-and-configuration-guide/#:~:text=mount%20%2Fdev%2Fsda1%20%2Fboot%2FEFI%20%20,FAT32%20EFI%20partition" rel="noopener noreferrer"&gt;How to Install &amp;amp; Configure Arch Linux on UEFI Systems&lt;/a&gt;) (&lt;a href="https://linuxiac.com/arch-linux-install/#:~:text=Below%2C%20I%E2%80%99ll%20show%20you%20how,which%20desktop%20environment%20reigns%20supreme" rel="noopener noreferrer"&gt;How to Install Arch Linux: A Beginner’s Practical Guide&lt;/a&gt;), including Windows preparation notes (&lt;a href="https://unix.stackexchange.com/questions/477733/is-it-necessary-to-disable-fast-boot-in-windows-to-dual-boot-with-linuxefistub#:~:text=On%20the%20other%20hand%2C%20the,have%20not%20been%20cleanly%20unmounted" rel="noopener noreferrer"&gt;Is it necessary to disable Fast Boot in Windows to dual boot with linux(EFISTUB)? - Unix &amp;amp; Linux Stack Exchange&lt;/a&gt;) (&lt;a href="https://gist.github.com/Pamblam/99ef7b1f3c4f0f1526692ee4ea07d957#:~:text=Make%20a%20bootable%20USB" rel="noopener noreferrer"&gt;Installing And Setting Up Arch Linux to Dual Boot Alongside Window 10 · GitHub&lt;/a&gt;).&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🍪 Securing Laravel Applications with Cookies: A Guide to Safer Authentication</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Tue, 15 Apr 2025 13:40:02 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/securing-laravel-applications-with-cookies-a-guide-to-safer-authentication-4837</link>
      <guid>https://forem.com/abdielwilsn/securing-laravel-applications-with-cookies-a-guide-to-safer-authentication-4837</guid>
      <description>&lt;p&gt;When building web applications with Laravel, securing user authentication is critical. One powerful and often overlooked way to enhance security is through the proper use of &lt;strong&gt;cookies&lt;/strong&gt;—especially &lt;strong&gt;HttpOnly&lt;/strong&gt;, &lt;strong&gt;Secure&lt;/strong&gt;, and &lt;strong&gt;SameSite&lt;/strong&gt; cookies.&lt;/p&gt;

&lt;p&gt;In this post, I'll explore how cookies work in Laravel, how to safely store authentication tokens, and why you should consider using cookies over localStorage.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔐 Why Cookies Matter for Security
&lt;/h3&gt;

&lt;p&gt;By default, many frontend apps store tokens (like JWTs) in &lt;code&gt;localStorage&lt;/code&gt; or &lt;code&gt;sessionStorage&lt;/code&gt;. While convenient, this leaves tokens &lt;strong&gt;vulnerable to XSS attacks&lt;/strong&gt;, since JavaScript can access them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cookies&lt;/strong&gt;, especially those marked as &lt;code&gt;HttpOnly&lt;/code&gt;, are more secure because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript cannot read &lt;code&gt;HttpOnly&lt;/code&gt; cookies&lt;/li&gt;
&lt;li&gt;Cookies are automatically sent with each request to the same origin&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;Secure&lt;/code&gt; and &lt;code&gt;SameSite&lt;/code&gt; flags, they’re safe against many common attacks&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Using Cookies in Laravel
&lt;/h2&gt;

&lt;p&gt;Laravel makes working with cookies easy. You can attach cookies to responses and read them from requests with just a few lines of code.&lt;/p&gt;




&lt;h3&gt;
  
  
  📥 Setting a Cookie in Laravel
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Http\Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Support\Facades\Cookie&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Symfony\Component\HttpFoundation\Response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// After authenticating the user and generating a token (JWT or session)&lt;/span&gt;
    &lt;span class="nv"&gt;$token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'your-generated-token'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'message'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'Login successful'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s1"&gt;'token'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Expires in 1 day&lt;/span&gt;
            &lt;span class="s1"&gt;'/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Strict'&lt;/span&gt; &lt;span class="c1"&gt;// path, domain, secure, httpOnly, raw, sameSite&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;
  
  
  ✅ Breakdown of Options:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;token&lt;/code&gt;: name of the cookie&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$token&lt;/code&gt;: value&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;60 * 24&lt;/code&gt;: duration in minutes (1 day)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt;: &lt;strong&gt;Secure&lt;/strong&gt; — only sent over HTTPS&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;true&lt;/code&gt;: &lt;strong&gt;HttpOnly&lt;/strong&gt; — not accessible via JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'Strict'&lt;/code&gt;: &lt;strong&gt;SameSite&lt;/strong&gt; — prevents CSRF from other origins&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  📤 Reading a Cookie
&lt;/h3&gt;

&lt;p&gt;To access the token from a request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'token'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// validate and use token&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ⚙️ Laravel Middleware: CORS &amp;amp; Cookies
&lt;/h3&gt;

&lt;p&gt;If your frontend is on a different domain (e.g., &lt;code&gt;vueapp.com&lt;/code&gt; calling &lt;code&gt;api.laravelapp.com&lt;/code&gt;), make sure to update &lt;code&gt;cors.php&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// config/cors.php&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s1"&gt;'supports_credentials'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'allowed_origins'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'https://your-frontend.com'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="s1"&gt;'allowed_headers'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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="s1"&gt;'allowed_methods'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And on your frontend (e.g. Vue + Axios):&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;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;withCredentials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ⚠️ Common Mistakes
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Storing sensitive data in localStorage&lt;/strong&gt;: Avoid this for access/refresh tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not using HTTPS&lt;/strong&gt;: &lt;code&gt;Secure&lt;/code&gt; cookies require HTTPS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting CORS setup&lt;/strong&gt;: Cross-origin cookies require proper CORS headers and &lt;code&gt;withCredentials&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🎯 When to Use Cookies
&lt;/h2&gt;

&lt;p&gt;Use cookies when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want to &lt;strong&gt;secure tokens with HttpOnly&lt;/strong&gt; protection&lt;/li&gt;
&lt;li&gt;You prefer automatic session management&lt;/li&gt;
&lt;li&gt;You need to handle &lt;strong&gt;long-lived sessions&lt;/strong&gt; (e.g., “Remember Me” logins)&lt;/li&gt;
&lt;li&gt;You want to prevent XSS access to your tokens&lt;/li&gt;
&lt;/ul&gt;




</description>
    </item>
    <item>
      <title>Is Git a Programming Language? What Exactly Are These Devs Talking About?</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Thu, 27 Mar 2025 15:19:36 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/is-git-a-programming-language-what-exactly-are-these-devs-talking-about-121h</link>
      <guid>https://forem.com/abdielwilsn/is-git-a-programming-language-what-exactly-are-these-devs-talking-about-121h</guid>
      <description>&lt;p&gt;If you’ve ever hung around developers or poked your head into the world of coding, you’ve probably heard the term "Git" thrown around like it’s the secret sauce of software development. But here’s a question that pops up now and then, especially from newcomers: &lt;em&gt;Is Git a programming language?&lt;/em&gt; Spoiler alert: No, it’s not. But if it’s not a programming language, then what is it, and why are devs so obsessed with it? Let’s break it down.&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Isn’t a Programming Language—It’s a Tool
&lt;/h4&gt;

&lt;p&gt;First things first: Git is not a programming language like Python, Java, or C++. You can’t use it to write apps, build websites, or calculate the meaning of life (well, maybe indirectly). Instead, Git is a &lt;em&gt;version control system&lt;/em&gt; (VCS)—a tool that helps developers manage changes to their code over time. Think of it as a super-powered "undo" button combined with a collaborative workspace for teams of coders.&lt;/p&gt;

&lt;p&gt;Programming languages are all about giving instructions to a computer to execute specific tasks. Git, on the other hand, is about keeping track of &lt;em&gt;what&lt;/em&gt; you’ve written in those languages, &lt;em&gt;when&lt;/em&gt; you wrote it, and &lt;em&gt;who&lt;/em&gt; changed it. It’s less about creating and more about organizing and preserving.&lt;/p&gt;

&lt;h4&gt;
  
  
  So, What Does Git Do?
&lt;/h4&gt;

&lt;p&gt;Imagine you’re writing a novel, and every time you make a change—adding a chapter, tweaking a character, or deleting a plot twist—you save a snapshot of the entire draft. Now imagine you can go back to any of those snapshots whenever you want, compare them, or even merge two different versions together. That’s Git in a nutshell, but for code.&lt;/p&gt;

&lt;p&gt;Here’s a quick rundown of what Git does for developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tracks Changes&lt;/strong&gt;: Every time you tweak your code, Git records it. Forgot what you changed last Tuesday? Git’s got your back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Branching&lt;/strong&gt;: Want to experiment with a new feature without breaking your main project? Git lets you create a "branch"—a separate version of your code you can mess with risk-free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merging&lt;/strong&gt;: Once your experiment works, Git helps you combine it back into the main codebase without chaos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt;: Working with a team? Git lets everyone contribute simultaneously, keeping track of who did what and resolving conflicts when they arise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, Git is like a time machine and a team coordinator rolled into one. No wonder devs talk about it like it’s their best friend.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why the Confusion?
&lt;/h4&gt;

&lt;p&gt;So why do some people wonder if Git is a programming language? A couple of reasons might explain it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Command-Line Vibes&lt;/strong&gt;: Git is often used via a terminal with commands like &lt;code&gt;git commit&lt;/code&gt;, &lt;code&gt;git push&lt;/code&gt;, or &lt;code&gt;git merge&lt;/code&gt;. To a newbie, typing cryptic commands might feel a bit like coding. But these are just instructions to the Git tool, not a language for building software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ubiquity in Dev Culture&lt;/strong&gt;: Git is so deeply embedded in the developer workflow—especially with platforms like GitHub—that it’s easy to assume it’s part of the "programming" toolkit in a more literal sense.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripting Overlap&lt;/strong&gt;: Advanced users can write scripts (in actual programming languages like Bash or Python) to automate Git tasks, which might blur the lines for some.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  What Devs Mean When They Talk About Git
&lt;/h4&gt;

&lt;p&gt;When developers mention Git, they’re usually geeking out over one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"I messed up—thank God for Git!"&lt;/strong&gt;: They probably reverted a disastrous change using &lt;code&gt;git reset&lt;/code&gt; or &lt;code&gt;git checkout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Pushed to the main branch"&lt;/strong&gt;: They’ve uploaded their latest code to a shared repository (often hosted on GitHub, GitLab, or Bitbucket).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Merge conflict hell"&lt;/strong&gt;: They’re wrestling with Git to reconcile two conflicting sets of changes—every dev’s rite of passage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Git blame says Steve wrote this"&lt;/strong&gt;: They’re using Git’s history to figure out who to bug about a buggy line of code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not about writing software; it’s about &lt;em&gt;managing&lt;/em&gt; the process of writing software. And trust me, when you’re juggling thousands of lines of code across a team, that management is a lifesaver.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Real Programming Languages Behind Git
&lt;/h4&gt;

&lt;p&gt;Here’s a fun twist: Git itself was written in a programming language—mostly C, with some bits in Shell and Perl. Created by Linus Torvalds (yes, the Linux guy) in 2005, Git is a program that devs use, not a language they code in. So while it’s not a programming language, it’s a product of one—a tool built to solve a very specific problem in the coding world.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wrapping Up
&lt;/h4&gt;

&lt;p&gt;So, is Git a programming language? Nope—it’s a version control system, a tool that keeps code organized, trackable, and collaborative. Devs talk about it all the time because it’s the glue that holds their projects together, whether they’re solo hackers or part of a sprawling team. Next time you hear someone mention Git, don’t think of it as a language—think of it as the unsung hero of the coding universe, quietly saving the day one commit at a time.&lt;/p&gt;

&lt;p&gt;Now, if you’ll excuse me, I’ve got some changes to push. Happy coding—or at least happy version-controlling!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>git</category>
    </item>
    <item>
      <title>CSS Units</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Fri, 27 Dec 2024 16:11:09 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/css-units-2fcj</link>
      <guid>https://forem.com/abdielwilsn/css-units-2fcj</guid>
      <description>&lt;p&gt;CSS units are essential tools that determine how styles and dimensions are applied to elements on a web page. Whether you're defining the size of text, margins, padding, or positioning elements, choosing the right unit is crucial for creating responsive and visually appealing designs. This article explores the different types of CSS units and their appropriate use cases.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Types of CSS Units&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CSS units are broadly categorized into two types:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Absolute Units&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relative Units&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Absolute Units&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Absolute units represent fixed values that remain the same regardless of the context or screen size. They are precise but not suitable for responsive designs.  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Common Absolute Units&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;px (Pixels):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Represents a single dot on the screen.
&lt;/li&gt;
&lt;li&gt;Most commonly used for small elements like borders or text.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;font-size&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;16&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;margin&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;10&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;cm (Centimeters) and mm (Millimeters):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used for print designs where real-world dimensions are needed.
&lt;/li&gt;
&lt;li&gt;Rarely used in web development.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;in (Inches):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 inch equals 2.54 cm or 96px.
&lt;/li&gt;
&lt;li&gt;Similar to &lt;code&gt;cm&lt;/code&gt; and &lt;code&gt;mm&lt;/code&gt;, mainly used for printed documents.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;pt (Points) and pc (Picas):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Typically used in typography and print media.
&lt;/li&gt;
&lt;li&gt;1pt = 1/72 inch, and 1pc = 12pt.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When to Use Absolute Units:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Absolute units are best for print styles or when you want precise, non-scalable measurements.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Relative Units&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Relative units depend on the size of other elements, making them ideal for responsive designs.  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Common Relative Units&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;% (Percentage):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Defines a value relative to the parent element.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;50&lt;/span&gt;&lt;span class="o"&gt;%;&lt;/span&gt; &lt;span class="c"&gt;/* 50% of the parent element's width */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;em:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relative to the font size of the parent element.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;font-size&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;em&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* 2 times the parent element's font size */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;rem (Root em):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relative to the root element's font size (usually &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;font-size&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="nt"&gt;rem&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* 1.5 times the root font size */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;vw (Viewport Width) and vh (Viewport Height):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;1vw&lt;/code&gt; equals 1% of the viewport's width, and &lt;code&gt;1vh&lt;/code&gt; equals 1% of the viewport's height.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="nt"&gt;vw&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Full width of the viewport */&lt;/span&gt;
&lt;span class="nt"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="nt"&gt;vh&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Full height of the viewport */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;vmin and vmax:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vmin&lt;/code&gt;: 1% of the smaller dimension (width or height).
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vmax&lt;/code&gt;: 1% of the larger dimension.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;font-size&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;5&lt;/span&gt;&lt;span class="nt"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Scales based on the smaller viewport dimension */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;ch (Character):&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Represents the width of the &lt;code&gt;0&lt;/code&gt; character in the current font.
&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;20&lt;/span&gt;&lt;span class="nt"&gt;ch&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Width of 20 characters */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;ex:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relative to the height of the lowercase &lt;code&gt;x&lt;/code&gt; in the current font.
&lt;/li&gt;
&lt;li&gt;Rarely used due to inconsistent browser rendering.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Choosing Between Units&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Fixed Design:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use &lt;strong&gt;absolute units&lt;/strong&gt; like &lt;code&gt;px&lt;/code&gt; when creating static, pixel-perfect layouts.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Responsive Design:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;relative units&lt;/strong&gt; like &lt;code&gt;%&lt;/code&gt;, &lt;code&gt;em&lt;/code&gt;, &lt;code&gt;rem&lt;/code&gt;, &lt;code&gt;vw&lt;/code&gt;, and &lt;code&gt;vh&lt;/code&gt; for fluid and scalable designs.
&lt;/li&gt;
&lt;li&gt;Prefer &lt;code&gt;rem&lt;/code&gt; over &lt;code&gt;em&lt;/code&gt; for consistent typography.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Typography:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;em&lt;/code&gt; or &lt;code&gt;rem&lt;/code&gt; for font sizes to create a scalable and accessible design.
&lt;/li&gt;
&lt;li&gt;Combine with &lt;code&gt;ch&lt;/code&gt; for consistent line lengths.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Full-Screen Elements:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use &lt;code&gt;vw&lt;/code&gt; and &lt;code&gt;vh&lt;/code&gt; for elements that span the viewport.  &lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Examples in Practice&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;1. Absolute Units: Static Button&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;button&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;100px&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;50px&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;14px&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;h4&gt;
  
  
  &lt;strong&gt;2. Relative Units: Responsive Button&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;button&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;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&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;1em&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;h4&gt;
  
  
  &lt;strong&gt;3. Viewport Units: Full-Screen Section&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;section&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;100vw&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="no"&gt;lightblue&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;
  
  
  &lt;strong&gt;Tips for Using CSS Units Effectively&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start with &lt;code&gt;rem&lt;/code&gt; for Font Sizes:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Define a base font size (e.g., 16px) on the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; element and use &lt;code&gt;rem&lt;/code&gt; for scalable typography.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Combine Units for Flexibility:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use percentages for layout widths and &lt;code&gt;em&lt;/code&gt;/&lt;code&gt;rem&lt;/code&gt; for spacing and typography.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test on Multiple Devices:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ensure that your design looks good across different screen sizes.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;CSS units are fundamental to web design, and mastering their use is key to creating both beautiful and functional websites. By understanding the differences between absolute and relative units, you can build responsive layouts that adapt seamlessly to any screen size. Practice combining units in real-world projects, and you'll soon be crafting designs with precision and flexibility.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering CSS Transitions, Animations, and Transformations: Bring Your Web Designs to Life</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Tue, 24 Dec 2024 15:10:25 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/mastering-css-transitions-animations-and-transformations-bring-your-web-designs-to-life-2p3a</link>
      <guid>https://forem.com/abdielwilsn/mastering-css-transitions-animations-and-transformations-bring-your-web-designs-to-life-2p3a</guid>
      <description>&lt;p&gt;CSS is more than just a tool for styling; it’s a gateway to creating interactive, engaging, and visually captivating web experiences. By mastering &lt;strong&gt;transitions&lt;/strong&gt;, &lt;strong&gt;animations&lt;/strong&gt;, and &lt;strong&gt;transformations&lt;/strong&gt;, you can elevate your designs, making them smooth and dynamic. Let’s explore how to use these powerful features.&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Transitions: Smoothly Shift Between Styles
&lt;/h2&gt;

&lt;p&gt;Transitions allow you to smoothly interpolate between two states of a CSS property. Instead of abrupt changes, transitions create gradual shifts that enhance user interaction.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Key Properties of Transitions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;transition-property&lt;/code&gt;:&lt;/strong&gt; Specifies the CSS property to animate (e.g., &lt;code&gt;color&lt;/code&gt;, &lt;code&gt;transform&lt;/code&gt;, or &lt;code&gt;opacity&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;transition-duration&lt;/code&gt;:&lt;/strong&gt; Sets how long the transition lasts (e.g., &lt;code&gt;0.5s&lt;/code&gt;, &lt;code&gt;2s&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;transition-timing-function&lt;/code&gt;:&lt;/strong&gt; Defines the speed curve (e.g., &lt;code&gt;ease&lt;/code&gt;, &lt;code&gt;linear&lt;/code&gt;, &lt;code&gt;ease-in-out&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;transition-delay&lt;/code&gt;:&lt;/strong&gt; Adds a delay before the transition begins.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Example: A Hover Effect for Buttons
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;button&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;#007BFF&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="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;background-color&lt;/span&gt; &lt;span class="m"&gt;0.3s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;transform&lt;/span&gt; &lt;span class="m"&gt;0.3s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nd"&gt;:hover&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;#0056b3&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;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This creates a smooth background color change and a slight enlargement when the user hovers over the button.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Animations: Define Dynamic, Multi-Step Effects
&lt;/h2&gt;

&lt;p&gt;With animations, you can craft more complex effects by defining keyframes, each specifying a different style at a certain point in time.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Anatomy of a CSS Animation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@keyframes&lt;/code&gt;:&lt;/strong&gt; Defines the animation steps.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;animation-name&lt;/code&gt;:&lt;/strong&gt; Refers to the &lt;code&gt;@keyframes&lt;/code&gt; by name.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;animation-duration&lt;/code&gt;:&lt;/strong&gt; Sets the animation's runtime.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;animation-timing-function&lt;/code&gt;:&lt;/strong&gt; Defines how the animation progresses (e.g., &lt;code&gt;ease&lt;/code&gt;, &lt;code&gt;linear&lt;/code&gt;).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;animation-iteration-count&lt;/code&gt;:&lt;/strong&gt; Specifies how many times the animation will repeat.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example: Bouncing Animation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;bounce&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%,&lt;/span&gt; &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&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;translateY&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;span class="err"&gt;50&lt;/span&gt;&lt;span class="o"&gt;%&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;translateY&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="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;div&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;100px&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;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#FF5733&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;bounce&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt; &lt;span class="n"&gt;ease-in-out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This creates a bouncing effect where the div moves up and down repeatedly.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS Transformations: Modify Elements in Space
&lt;/h2&gt;

&lt;p&gt;Transformations allow you to manipulate an element’s shape, size, and position using properties like &lt;code&gt;translate&lt;/code&gt;, &lt;code&gt;scale&lt;/code&gt;, &lt;code&gt;rotate&lt;/code&gt;, and &lt;code&gt;skew&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Transform Functions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;translate(x, y)&lt;/code&gt;:&lt;/strong&gt; Moves an element along the X and Y axes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;scale(x, y)&lt;/code&gt;:&lt;/strong&gt; Resizes an element along the X and Y axes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rotate(deg)&lt;/code&gt;:&lt;/strong&gt; Rotates an element around a fixed point.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;skew(x, y)&lt;/code&gt;:&lt;/strong&gt; Slants an element along the X and Y axes.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Transform Origin and Perspective
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;transform-origin&lt;/code&gt;:&lt;/strong&gt; Defines the pivot point for transformations (default is the center).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;perspective&lt;/code&gt;:&lt;/strong&gt; Adds depth to 3D transformations.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example: A 3D Rotation Effect
&lt;/h3&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="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;150px&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;#4CAF50&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;rotateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;45deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;transform-origin&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;perspective&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1000px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This rotates the div along the Y-axis, creating a 3D effect.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Bringing It All Together
&lt;/h2&gt;

&lt;p&gt;By combining transitions, animations, and transformations, you can create complex effects that improve user engagement. For instance:  &lt;/p&gt;

&lt;h3&gt;
  
  
  Example: A Complete Interactive Card
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&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;300px&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="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;45deg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#007BFF&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#00FF7F&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;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;transform&lt;/span&gt; &lt;span class="m"&gt;0.5s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;box-shadow&lt;/span&gt; &lt;span class="m"&gt;0.5s&lt;/span&gt; &lt;span class="n"&gt;ease&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transform-origin&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;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&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;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;10deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="n"&gt;rgba&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="m"&gt;0&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="m"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;pulse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%,&lt;/span&gt; &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="n"&gt;rgba&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="m"&gt;0&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="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;50&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="n"&gt;rgba&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="m"&gt;0&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="m"&gt;0.8&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;span class="nc"&gt;.card&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pulse&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;This example combines hover transitions, keyframe animations, and transformations to create a visually stunning interactive card.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;CSS transitions, animations, and transformations are the building blocks of interactive web design. By mastering these techniques, you can create compelling user experiences that captivate and engage your audience. Start experimenting, and let your creativity shine!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Build Responsive Websites: A Beginner’s Guide</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Tue, 24 Dec 2024 15:02:30 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/how-to-build-responsive-websites-a-beginners-guide-2mig</link>
      <guid>https://forem.com/abdielwilsn/how-to-build-responsive-websites-a-beginners-guide-2mig</guid>
      <description>&lt;p&gt;In today’s digital age, responsive websites are no longer a luxury—they’re a necessity. With users accessing websites from devices of all shapes and sizes, ensuring that your website adapts to different screen sizes is crucial. This guide will teach you the fundamentals of building a responsive website.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Is a Responsive Website?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A responsive website is a design approach that ensures a website's layout, images, and functionalities adapt seamlessly to different devices, whether it's a desktop, tablet, or smartphone. The goal is to provide the best user experience regardless of screen size.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Key Components of a Responsive Website&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible Layouts&lt;/strong&gt;&lt;br&gt;
Use percentage-based widths rather than fixed pixel dimensions. This ensures elements resize proportionally to the screen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Media Queries&lt;/strong&gt;&lt;br&gt;
Media queries in CSS allow you to apply styles based on the device's screen size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive Images&lt;/strong&gt;&lt;br&gt;
Ensure images scale appropriately within their containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mobile-First Design&lt;/strong&gt;&lt;br&gt;
Design for smaller screens first, then scale up for larger screens.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Steps to Build a Responsive Website&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. &lt;strong&gt;Set Up the HTML Structure&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Start with clean and semantic HTML. Use a &lt;code&gt;meta&lt;/code&gt; tag in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section to set the viewport for responsive design:&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;title&amp;gt;&lt;/span&gt;Responsive Website&lt;span class="nt"&gt;&amp;lt;/title&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;"styles.css"&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;body&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;Welcome to My Website&lt;span class="nt"&gt;&amp;lt;/h1&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;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;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;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;main&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;This is a responsive website example.&lt;span class="nt"&gt;&amp;lt;/p&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;/main&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;© 2024 My Website&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/footer&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;
  
  
  2. &lt;strong&gt;Write the CSS&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Start with a mobile-first approach and use media queries for larger screens.&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;/* Base Styles */&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;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;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="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&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;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&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;span class="nt"&gt;nav&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="nt"&gt;li&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;inline-block&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="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="nt"&gt;nav&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="nt"&gt;a&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;text-decoration&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="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;main&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="c"&gt;/* Responsive Styles */&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="nt"&gt;nav&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="nt"&gt;li&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="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;main&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="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&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="nt"&gt;header&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;left&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;1em&lt;/span&gt; &lt;span class="m"&gt;10%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&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;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;right&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;h4&gt;
  
  
  3. &lt;strong&gt;Make Images Responsive&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Use the &lt;code&gt;max-width&lt;/code&gt; property to ensure images fit within their containers:&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;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;h4&gt;
  
  
  4. &lt;strong&gt;Use a Grid System&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;CSS Grid or Flexbox can help you create responsive layouts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with CSS Grid:&lt;/strong&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="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="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;gap&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="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="nc"&gt;.container&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;2&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="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&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="nc"&gt;.container&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="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;
  
  
  &lt;strong&gt;Tools and Frameworks&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bootstrap&lt;/strong&gt;: A popular CSS framework for responsive design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt;: A utility-first CSS framework with built-in responsiveness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Figma/Adobe XD&lt;/strong&gt;: Tools to design and prototype responsive layouts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Testing Responsiveness&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Browser Developer Tools&lt;/strong&gt;: Use the "Inspect" tool to emulate different devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Online Tools&lt;/strong&gt;: Websites like &lt;a href="https://www.responsinator.com/" rel="noopener noreferrer"&gt;Responsinator&lt;/a&gt; or &lt;a href="https://www.browserstack.com/" rel="noopener noreferrer"&gt;BrowserStack&lt;/a&gt; allow you to test on various devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real Devices&lt;/strong&gt;: Test on actual devices for the most accurate results.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Best Practices&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Optimize for Performance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use optimized images and lazy loading.&lt;/li&gt;
&lt;li&gt;Minify CSS and JavaScript.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ensure Accessibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use semantic HTML.&lt;/li&gt;
&lt;li&gt;Provide alt text for images.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keep Navigation Simple&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use collapsible menus for smaller screens.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test Across Browsers&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure compatibility with popular browsers like Chrome, Safari, and Firefox.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;Building responsive websites is essential for creating a great user experience. By understanding flexible layouts, media queries, and mobile-first design, you can create websites that look stunning on any device. Practice regularly, explore modern frameworks, and test your designs thoroughly to master the art of responsive web design.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS: A Basic Guide</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Tue, 24 Dec 2024 14:23:55 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/css-a-basic-guide-1mk5</link>
      <guid>https://forem.com/abdielwilsn/css-a-basic-guide-1mk5</guid>
      <description>&lt;p&gt;Cascading Style Sheets (CSS) is a styling language used to describe the presentation of HTML documents. It allows developers to control the layout, colors, fonts, and overall appearance of web pages, making them more visually appealing and user-friendly.  &lt;/p&gt;

&lt;p&gt;This article covers the basics of CSS, its syntax, common properties, and an example of creating and styling a simple form.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;CSS Syntax&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CSS rules are written in a specific syntax that consists of a selector, properties, and values. Here's the general structure:&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;selector&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;value&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;Selector&lt;/strong&gt;: Targets the HTML element(s) you want to style.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Property&lt;/strong&gt;: Defines what aspect of the element you want to style (e.g., color, font size).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value&lt;/strong&gt;: Specifies the details of the property (e.g., red, 16px).
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&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;This rule styles all &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; elements, setting their text color to blue and font size to 16px.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Using CSS&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CSS can be added to HTML documents in three ways:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Inline CSS&lt;/strong&gt;: Styles applied directly to an HTML element using the &lt;code&gt;style&lt;/code&gt; attribute.
&lt;/li&gt;
&lt;/ol&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;style=&lt;/span&gt;&lt;span class="s"&gt;"color: red;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is red text.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Internal CSS&lt;/strong&gt;: Styles written within a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag inside the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; section of the HTML document.
&lt;/li&gt;
&lt;/ol&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;style&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="nl"&gt;background-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="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;External CSS&lt;/strong&gt;: A separate &lt;code&gt;.css&lt;/code&gt; file linked to the HTML document using the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;   &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"styles.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;CSS Properties and Their Values&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;CSS provides a wide range of properties to style HTML elements. Below are some commonly used properties:  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Text and Font Properties&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;color&lt;/code&gt;: Sets the text color.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;red&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;font-size&lt;/code&gt;: Adjusts the size of text.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;font-size&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;20&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;text-align&lt;/code&gt;: Aligns text (e.g., left, center, right).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;text-align&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;center&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;font-family&lt;/code&gt;: Specifies the font type.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;font-family&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;Arial&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;sans-serif&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Box Model Properties&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt;: Define the size of an element.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;300&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="nt"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;200&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;padding&lt;/code&gt;: Adds space inside the element.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;10&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;margin&lt;/code&gt;: Adds space outside the element.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;margin&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;20&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;border&lt;/code&gt;: Adds a border around the element.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt; &lt;span class="nt"&gt;solid&lt;/span&gt; &lt;span class="nt"&gt;black&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Background Properties&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;background-color&lt;/code&gt;: Sets the background color.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;lightblue&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;background-image&lt;/code&gt;: Adds a background image.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;background-image&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'image.jpg'&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Other Useful Properties&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;display&lt;/code&gt;: Controls the layout of an element (e.g., block, inline, flex).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;position&lt;/code&gt;: Specifies how an element is positioned in the document.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;position&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;absolute&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;overflow&lt;/code&gt;: Manages content that overflows an element's box.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;  &lt;span class="nt"&gt;overflow&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;hidden&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &lt;strong&gt;Building a Simple Form and Styling It with CSS&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HTML Code for the Form&lt;/strong&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;Styled Form&lt;span class="nt"&gt;&amp;lt;/title&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;"styles.css"&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;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"contact-form"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Contact Us&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Name:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter your name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter your email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Message:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt; &lt;span class="na"&gt;rows=&lt;/span&gt;&lt;span class="s"&gt;"5"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Your message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/form&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;h3&gt;
  
  
  &lt;strong&gt;CSS Code to Style the Form&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;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;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#f4f4f4&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="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;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;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="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&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="m"&gt;#fff&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;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="n"&gt;rgba&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="m"&gt;0&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="m"&gt;0.1&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;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&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="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;label&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="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&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="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;textarea&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;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="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#ccc&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;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;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;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="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#007BFF&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;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&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="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.contact-form&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nd"&gt;:hover&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;#0056b3&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;
  
  
  &lt;strong&gt;Preview&lt;/strong&gt;
&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%2Fk8azbxlrrel3nagvjiin.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%2Fk8azbxlrrel3nagvjiin.png" alt="Image description" width="686" height="586"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;CSS is a powerful tool for designing visually engaging web pages. With practice and creativity, you can create stunning layouts and user interfaces. Experiment with the properties and techniques discussed here to enhance your web development skills.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git for Beginners: A Comprehensive Guide to Version Control</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Mon, 23 Dec 2024 12:29:06 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/git-for-beginners-a-comprehensive-guide-to-version-control-bn5</link>
      <guid>https://forem.com/abdielwilsn/git-for-beginners-a-comprehensive-guide-to-version-control-bn5</guid>
      <description>&lt;h3&gt;
  
  
  Introduction to Version Control
&lt;/h3&gt;

&lt;p&gt;In software development, tracking changes is crucial. Imagine working on a collaborative project where changes are frequent and mistakes can occur. &lt;strong&gt;Version Control Systems (VCS)&lt;/strong&gt; address this challenge by recording file changes, allowing developers to revisit specific versions when needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why We Need Version Control
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt;: Enables multiple developers to work on the same project simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;History Tracking&lt;/strong&gt;: Maintains a record of all changes, making it easy to identify when and why modifications occurred.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Recovery&lt;/strong&gt;: Mistakes can be rolled back without affecting the entire project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Development&lt;/strong&gt;: Supports branching, allowing multiple features or bug fixes to be developed independently.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Git: The Basics of Version Control
&lt;/h3&gt;

&lt;p&gt;Git is a &lt;strong&gt;distributed version control system&lt;/strong&gt;. Unlike traditional systems (e.g., Subversion or CVS), Git provides each developer with a complete copy of the repository, enhancing speed and reliability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Git vs. Other Version Control Systems
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Git&lt;/th&gt;
&lt;th&gt;Subversion (SVN)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Architecture&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Distributed&lt;/td&gt;
&lt;td&gt;Centralized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Faster&lt;/td&gt;
&lt;td&gt;Slower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Offline Work&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Branching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lightweight and fast&lt;/td&gt;
&lt;td&gt;Expensive&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Installing Git
&lt;/h3&gt;

&lt;p&gt;Before using Git, it needs to be installed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Steps to Install Git
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Windows&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Download the installer from &lt;a href="https://git-scm.com" rel="noopener noreferrer"&gt;git-scm.com&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run the installer and follow the setup wizard.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;macOS&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Homebrew:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; brew &lt;span class="nb"&gt;install &lt;/span&gt;git
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install via package manager:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;git   &lt;span class="c"&gt;# For Debian-based systems&lt;/span&gt;
 &lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;git       &lt;span class="c"&gt;# For Red Hat-based systems&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Getting Started with Git
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Initial Setup: &lt;code&gt;git config&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Configure your Git identity to link commits to your name and email.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"youremail@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify settings with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Initializing a Repository: &lt;code&gt;git init&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;A &lt;strong&gt;repository&lt;/strong&gt; is a project directory tracked by Git. To initialize one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;.git&lt;/code&gt; folder, where Git stores its tracking data.&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Git Concepts
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What is a Repository?
&lt;/h4&gt;

&lt;p&gt;A repository (repo) is a container that holds your project files and their revision history. It can be local (on your computer) or remote (on platforms like GitHub).&lt;/p&gt;

&lt;h4&gt;
  
  
  Branching
&lt;/h4&gt;

&lt;p&gt;Branches allow you to create separate environments for different tasks (e.g., features, bug fixes).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create a branch&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  git branch feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Switch branches&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  git checkout feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Merge branches&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  git checkout main
  git merge feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Remote Repositories and GitHub
&lt;/h3&gt;

&lt;p&gt;GitHub is a cloud-based platform for hosting remote Git repositories. It facilitates collaboration by providing tools for issue tracking, pull requests, and more.&lt;/p&gt;

&lt;h4&gt;
  
  
  Creating a GitHub Account
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Visit &lt;a href="https://github.com" rel="noopener noreferrer"&gt;github.com&lt;/a&gt; and sign up.&lt;/li&gt;
&lt;li&gt;Set up a personal profile and SSH keys for secure communication.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Creating a Repository on GitHub
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Log in to GitHub.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New Repository&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Provide a name and description.&lt;/li&gt;
&lt;li&gt;Choose visibility (public/private) and click &lt;strong&gt;Create Repository&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Cloning, Pulling, and Pushing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Cloning a Repository
&lt;/h4&gt;

&lt;p&gt;Copy an existing repository to your local machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &amp;lt;repository_url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Pulling Changes
&lt;/h4&gt;

&lt;p&gt;Update your local repository with changes from the remote repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Pushing Changes
&lt;/h4&gt;

&lt;p&gt;Send local commits to the remote repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Making Changes and Committing
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Staging and Committing
&lt;/h4&gt;

&lt;p&gt;After modifying files, you need to stage and commit changes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stage changes&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git add &amp;lt;file_name&amp;gt;  &lt;span class="c"&gt;# Add specific files&lt;/span&gt;
   git add &lt;span class="nb"&gt;.&lt;/span&gt;            &lt;span class="c"&gt;# Add all changes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Commit changes&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Describe your changes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Summary of Commands
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Initialize a repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git config&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set up user details&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git clone&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Copy a repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stage changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Save staged changes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Upload changes to remote repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Download changes from remote repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git branch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manage branches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git checkout&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Switch branches&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Next Steps for Beginners
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Practice basic Git operations on a small project.&lt;/li&gt;
&lt;li&gt;Explore advanced topics like resolving merge conflicts and creating pull requests.&lt;/li&gt;
&lt;li&gt;Learn Git workflows such as GitFlow or Forking Workflow for better team collaboration.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By mastering Git, you'll become a more efficient and collaborative developer, ready to tackle projects with confidence.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mastering HTML: The Basics, Semantic HTML, Forms and Validation, Accessibility, and SEO Basics</title>
      <dc:creator>Abdiel Wilson</dc:creator>
      <pubDate>Wed, 18 Dec 2024 12:39:12 +0000</pubDate>
      <link>https://forem.com/abdielwilsn/mastering-html-the-basics-semantic-html-forms-and-validation-accessibility-and-seo-basics-4idc</link>
      <guid>https://forem.com/abdielwilsn/mastering-html-the-basics-semantic-html-forms-and-validation-accessibility-and-seo-basics-4idc</guid>
      <description>&lt;p&gt;HTML (HyperText Markup Language) is the foundation of web development. It defines the structure and content of a webpage, serving as the skeleton upon which CSS and JavaScript add style and functionality. In this comprehensive guide, we’ll cover HTML fundamentals, semantic HTML, forms, accessibility, SEO basics, and best practices for each.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;1. The Basics of HTML&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTML uses elements to structure content. Each element is defined by tags, which are enclosed in angle brackets (&lt;code&gt;&amp;lt; &amp;gt;&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Basic Structure of an HTML Document&lt;/strong&gt;
&lt;/h4&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;Document Title&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;Hello, World!&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 a paragraph.&lt;span class="nt"&gt;&amp;lt;/p&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;Doctype&lt;/strong&gt;: Declares the document type (HTML5 in this case).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML Tag&lt;/strong&gt;: The root element of the page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Head Section&lt;/strong&gt;: Contains metadata, such as the document's title and character set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Body Section&lt;/strong&gt;: Contains the visible content of the webpage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;2. Semantic HTML&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Semantic HTML uses tags that convey the meaning of their content, improving readability for both developers and machines (e.g., search engines, screen readers).&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Common Semantic Elements&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;: Defines introductory content or navigation links.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;: Represents a section of navigation links.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;: Indicates the main content of the document.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;: Groups related content.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;: Represents a self-contained piece of content.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;aside&amp;gt;&lt;/code&gt;: Contains tangentially related content (e.g., sidebars).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;: Contains footer information like copyright or contact details.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Example: Semantic Structure&lt;/strong&gt;
&lt;/h4&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;title&amp;gt;&lt;/span&gt;Semantic HTML Example&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;header&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Website Title&lt;span class="nt"&gt;&amp;lt;/h1&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;ul&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;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;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;main&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;h2&amp;gt;&lt;/span&gt;About Us&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is an example of semantic HTML.&lt;span class="nt"&gt;&amp;lt;/p&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;aside&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Subscribe to our newsletter!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/aside&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;copy;&lt;/span&gt; 2024 Your Company&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/footer&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;&lt;strong&gt;Best Practices&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use semantic elements where possible to enhance clarity and SEO.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;3. Forms and Validation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTML forms allow users to submit data to a server.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Basic Form Structure&lt;/strong&gt;
&lt;/h4&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;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/submit"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Username:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Built-in Form Validation&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;HTML5 provides several attributes for client-side validation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;required&lt;/code&gt;: Ensures a field is filled out.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;type&lt;/code&gt;: Defines the input type (e.g., &lt;code&gt;email&lt;/code&gt;, &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;min&lt;/code&gt; and &lt;code&gt;max&lt;/code&gt;: Define numeric ranges.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pattern&lt;/code&gt;: Validates input against a regular expression.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxlength&lt;/code&gt; and &lt;code&gt;minlength&lt;/code&gt;: Specify character limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Example: Enhanced Form with Validation&lt;/strong&gt;
&lt;/h4&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;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/register"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Password:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;minlength=&lt;/span&gt;&lt;span class="s"&gt;"8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"age"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Age:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"number"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"age"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"age"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"18"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Register&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use HTML5 validation attributes whenever possible.&lt;/li&gt;
&lt;li&gt;Pair validation with server-side checks for security.&lt;/li&gt;
&lt;li&gt;Label all form inputs for accessibility.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;4. Accessibility&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Accessibility ensures that websites are usable by all people, including those with disabilities.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Key Accessibility Practices&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use ARIA (Accessible Rich Internet Applications)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add roles and attributes to enhance the accessibility of non-standard elements.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Submit Form"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Provide Text Alternatives&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the &lt;code&gt;alt&lt;/code&gt; attribute for images.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"logo.png"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Company Logo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keyboard Navigation&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure all interactive elements are navigable using &lt;code&gt;Tab&lt;/code&gt; and &lt;code&gt;Enter&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#content"&lt;/span&gt; &lt;span class="na"&gt;tabindex=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Skip to Content&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Descriptive Labels&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;5. SEO Basics&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Search Engine Optimization (SEO) helps improve the visibility of your website on search engines.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;HTML SEO Best Practices&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Descriptive Titles&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Learn HTML Basics and Best Practices&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Meta Tags&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provide descriptions for search engines.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&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;"description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"Comprehensive guide to HTML basics, forms, accessibility, and SEO."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Heading Hierarchy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; for the main title and &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt;, etc., for subsections.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to Our Website&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;About Us&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Alt Text for Images&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Describe the content of images for search engines and screen readers.&lt;/li&gt;
&lt;li&gt;Example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"team.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Our team photo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Optimize URLs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use meaningful and human-readable URLs.&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;https://example.com/learn-html&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;HTML is much more than a simple markup language. By following best practices in semantic HTML, form validation, accessibility, and SEO, you can create websites that are functional, user-friendly, and optimized for both users and search engines. Mastering these concepts lays a strong foundation for building modern, effective web applications.&lt;/p&gt;

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