<?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: Aditya Pratap</title>
    <description>The latest articles on Forem by Aditya Pratap (@sleepppppin).</description>
    <link>https://forem.com/sleepppppin</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%2F3741562%2Ff58e3e08-cf45-46c7-b54c-d291a8cedce8.png</url>
      <title>Forem: Aditya Pratap</title>
      <link>https://forem.com/sleepppppin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sleepppppin"/>
    <language>en</language>
    <item>
      <title>TCP</title>
      <dc:creator>Aditya Pratap</dc:creator>
      <pubDate>Fri, 30 Jan 2026 13:11:15 +0000</pubDate>
      <link>https://forem.com/sleepppppin/tcp-n9h</link>
      <guid>https://forem.com/sleepppppin/tcp-n9h</guid>
      <description>&lt;p&gt;There's a norm while asking for your crush's number, it starts with a "Hi", you don't usually go up to them and ask "Can i get your number", they might not know you, you will be rejected and who wants that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transmission Control Protocol (TCP)
&lt;/h2&gt;

&lt;p&gt;TCP is a network protocol that is used for reliable transportation of data. When you send a web request, that request might be coming through a ton of hurdles, facing crazy monsters or even die in the path.&lt;br&gt;
What really happens is the data packets you receive and send can face numerous problems,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some packets get lost in the way.&lt;/li&gt;
&lt;li&gt;Data packets get unordered/mixed.&lt;/li&gt;
&lt;li&gt;Can receive duplicate packets.&lt;/li&gt;
&lt;li&gt;Data could have been corrupted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TCP helps with this, it's like a postal office for data you share and ensures that, data arrives reliably, in same order and fixes corrupted data.&lt;/p&gt;

&lt;h2&gt;
  
  
  TCP 3-Way Handshake
&lt;/h2&gt;

&lt;p&gt;A TCP Connection is initialized by a procedure referred as 3-Way Handshake.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjuen7z7eahat7tszmah.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%2Fxjuen7z7eahat7tszmah.png" alt="TCP 3-Way Handshake" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SYN&lt;/strong&gt; (Synchronize) – The client says: “Hey, I’m here and want to talk. My sequence number is 121.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SYN-ACK&lt;/strong&gt; (Synchronize + Acknowledge) – The server replies: “Heyo my mate! My sequence number is 404 and I got your 121.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACK&lt;/strong&gt; (Acknowledge) – The client responds: “Great! I got your 404 as well. Let’s deal now:&amp;gt;”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The connection is open now and the data can be transferred securely.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Data Transfer Works in TCP
&lt;/h2&gt;

&lt;p&gt;After the handshake,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TCP splits data into smaller segments (like sending letters in envelopes).&lt;/li&gt;
&lt;li&gt;Each segment has a sequence number so that it can be ordered later.&lt;/li&gt;
&lt;li&gt;The receiver replies ACKs for each segment received.&lt;/li&gt;
&lt;li&gt;If a segment is lost, TCP automatically resends it.
&amp;gt; Think of it like sending numbered letters in the mail. If receiver says “I didn’t get number 3,” you resend it again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TCP Connection Closing
&lt;/h2&gt;

&lt;p&gt;Just like you don’t hang up your crush mid-call, TCP also says bye politely when the chat is done.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- FIN – The client says: “I’m done sending data.”&lt;/li&gt;
&lt;li&gt;- ACK – The server replies: “Gotcha, will talk later.”&lt;/li&gt;
&lt;li&gt;- FIN – The server says: “Byeeee”&lt;/li&gt;
&lt;li&gt;- ACK – The client confirms: “GooodByeee”&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's time to disconnect the call.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>computerscience</category>
      <category>learning</category>
      <category>networking</category>
    </item>
    <item>
      <title>cURL</title>
      <dc:creator>Aditya Pratap</dc:creator>
      <pubDate>Fri, 30 Jan 2026 12:18:54 +0000</pubDate>
      <link>https://forem.com/sleepppppin/curl-46e7</link>
      <guid>https://forem.com/sleepppppin/curl-46e7</guid>
      <description>&lt;p&gt;Client URL (cURL) is an open source command line tool for transferring data using URLs. It supports multiple protocols including HTTP, HTTPS, FTP, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's extensively used
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Testing Purposes&lt;br&gt;
Check if a server is up or debug it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;API Development&lt;br&gt;
Send GET or POST requests directly to APIs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;API can be thought of a carrier that takes in request and responds with a response.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automating requests&lt;br&gt;
Several developers use cURL to automate HTTP requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learning purposes&lt;br&gt;
Understand HTTP requests and responses within the terminal.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Initializing cURL Request
&lt;/h2&gt;

&lt;p&gt;Let's hit this&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -v https://example.com&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;v is a flag for 'verbose' output so that our curl command won't hide headers.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;The response will be something like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; GET / HTTP/2
&amp;gt; Host: example.com
&amp;gt; User-Agent: curl/8.5.0
&amp;gt; Accept: */*
&amp;gt; 
&amp;lt; HTTP/2 200 
&amp;lt; content-type: text/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here these "&amp;gt;" and "&amp;lt;" symbols mark something,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Request headers (sent by curl)
&amp;lt; Response headers (sent by server)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Request Headers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; GET / HTTP/2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells, We are using the GET HTTP method and HTTP/2 is the protocol's version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Host: example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Informs the server which domain is requested.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; User-Agent: curl/8.5.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Identifies who is making the request, here it's done by curl.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Accept: */*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Says “I’ll accept any content type”&lt;/p&gt;

&lt;h2&gt;
  
  
  Response Headers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt; HTTP/2 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, HTTP/2 is the protocol we used.&lt;br&gt;
200 is a HTTP status code, which means the request was successful.&lt;/p&gt;

&lt;p&gt;Other frequently appearing status codes are:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzdetdfkqgymkvi1mclh.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%2Fxzdetdfkqgymkvi1mclh.png" alt="HTTP Status Codes" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt; content-type: text/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Describes the content returned by server, here it is a HTML document.&lt;/p&gt;

&lt;h2&gt;
  
  
  GET Method (read only)
&lt;/h2&gt;

&lt;p&gt;The GET method is an HTTP request method used to retrieve data from a server without modifying it.&lt;br&gt;
BY default, curl uses GET method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~$ curl https://api.freeapi.app/api/v1/public/randomjokes/joke/random
{"statusCode":200,"data":{"categories":["dev"],"id":75,"content":"Chuck Norris is the ultimate mutex, all threads fear him."},"message":"Random joke fetched successfully","success":true}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we requested the API for a random joke and it responded with a JSON object. &lt;/p&gt;

&lt;h2&gt;
  
  
  POST Method (read or write)
&lt;/h2&gt;

&lt;p&gt;The POST request method is used to create or update data on the server.&lt;br&gt;
We have to use '-X' flag to command curl to use POST.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~$ curl -X POST https://api.freeapi.app/api/v1/users/login \
  -H "Content-Type: application/json" \
  -d '{"username":"doejohn","password":"test@123"}'
{
  "statusCode": 200,
  "success": true,
  "message": "User logged in successfully",
  "data": {
    "user": {
      "_id": "697c9e5caf1517d02a2fb058",
      "username": "doejohn",
      "email": "user.email@domain.com",
      "role": "ADMIN",
      "loginType": "EMAIL_PASSWORD",
      "isEmailVerified": false
    },
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we requested the API to login with out user and password and it responded with login info.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Beginner Mistakes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Missing https:// in URL&lt;/li&gt;
&lt;li&gt;Forgetting Content-Type for JSON&lt;/li&gt;
&lt;li&gt;Not knowing useful flags like "-A"&lt;/li&gt;
&lt;li&gt;Expecting browser-like output&lt;/li&gt;
&lt;li&gt;Ignoring status codes and headers&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>api</category>
      <category>beginners</category>
      <category>cli</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Emmet for HTML</title>
      <dc:creator>Aditya Pratap</dc:creator>
      <pubDate>Fri, 30 Jan 2026 10:25:46 +0000</pubDate>
      <link>https://forem.com/sleepppppin/emmet-for-html-bm0</link>
      <guid>https://forem.com/sleepppppin/emmet-for-html-bm0</guid>
      <description>&lt;p&gt;Writing HTML for web pages is a repetitive and boring task, you got to open the tags, then close them, there's a boilerplate that has to be there everytime but you write it again, overall a lot of hassle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Emmet
&lt;/h2&gt;

&lt;p&gt;Emmet is a tool for text editors for quick code editing. We will be utilizing it to write HTML with it's shortcut syntax.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;How Emmet Works Inside Code Editors&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You type in a shortcut and Press Tab.&lt;/li&gt;
&lt;li&gt;The editor expands it into full HTML markup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Normal Emmet Syntax
&lt;/h2&gt;

&lt;p&gt;1) Creating Elements&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;div&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;2) Adding Classes and IDs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# . for classes and # for IDs
div.container
h1#main-title
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;h1 id="main-title"&amp;gt;&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Muliplying Elements&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# * followed by number to repeat elements
li.item*5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;li class="item"&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class="item"&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class="item"&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class="item"&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;li class="item"&amp;gt;&amp;lt;/li&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Nesting Elements&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# &amp;gt; to nest elements inside each other
div.container&amp;gt;ul&amp;gt;li*3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;ul&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5) Adding Attributes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# [] for attributes and {} for value
a[href="https://example.com"]{Click here}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="https://example.com"&amp;gt;Click here&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6) HTML Boilerplate&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;→ expands to:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>html</category>
      <category>productivity</category>
      <category>tooling</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Selectors</title>
      <dc:creator>Aditya Pratap</dc:creator>
      <pubDate>Fri, 30 Jan 2026 10:03:58 +0000</pubDate>
      <link>https://forem.com/sleepppppin/css-selectors-3906</link>
      <guid>https://forem.com/sleepppppin/css-selectors-3906</guid>
      <description>&lt;p&gt;Selectors in CSS are a way to style specific parts of your web page that could be either whole document, a single element or multiple.&lt;/p&gt;

&lt;h2&gt;
  
  
  THE NEED
&lt;/h2&gt;

&lt;p&gt;Suppose a pool of people, you only wanna email people of age group 21-24, how will you move on. You can not just bombard some mails randomly or share them to everyone, there is a specific case. First, you will filter out the data and then proceed with the emails after filtering the correct ones out. That's just how CSS Selectors help.&lt;/p&gt;

&lt;p&gt;Let's checkout some CSS Selectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Element Selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It targets all elements of a specific type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;This is another paragraph.&amp;lt;/p&amp;gt;

p {
  color: blue;
}

# All &amp;lt;p&amp;gt; elements turn blue.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Class Selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classes let you couple multiple elements as per convenience and style them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p class="highlight"&amp;gt;Important text!&amp;lt;/p&amp;gt;
&amp;lt;span class="highlight"&amp;gt;Notice me too!&amp;lt;/span&amp;gt;

.highlight {
  background-color: yellow;
}

# Both the paragraph and span get a yellow background.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;ID Selector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ID selector allows targeting single element with their HTML id.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h2 id="main-title"&amp;gt;Welcome!&amp;lt;/h2&amp;gt;
&amp;lt;h2&amp;gt; Platform Features &amp;lt;/h2&amp;gt;

#main-title {
  font-size: 36px;
  color: darkgreen;
}

# H2 element with id="main-title" is styled.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Group Selectors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's possible to target multiple HTML elements by grouping them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h1, h2, h3 {
  font-family: 'Arial', sans-serif;
  color: navy;
}

# All headings from &amp;lt;h1&amp;gt; to &amp;lt;h3&amp;gt; get the same font and color.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Descendant Selectors
Descendant selectors allow you target elements nested inside other elements.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="card"&amp;gt;
  &amp;lt;p&amp;gt;This is inside a card.&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;p&amp;gt;This is outside the card.&amp;lt;/p&amp;gt;

.card p {
  color: red;
}

# Only the paragraph inside .card turns red.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Universal Selector
Allows targeting complete web page.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  font-family: 'Arial', sans-serif;
  color: navy;
}

# Complete page's font is styled.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Selectors Specificity
&lt;/h2&gt;

&lt;p&gt;At time multiple selectors can target the same element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
  color: blue;
}

.highlight {
  color: green;
}

#main-text {
  color: red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, CSS cascades over and over with the utmost priority given on how specific this selector is.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ID selector (#id) → highest priority&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Class selector (.class) → medium priority&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Element selector (element) → low priority&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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