<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kelvin Duobu</title>
    <description>The latest articles on DEV Community by Kelvin Duobu (@khaekelvin).</description>
    <link>https://dev.to/khaekelvin</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%2F1124224%2F94ddd45b-5651-42af-addc-33b3b2e129f6.jpeg</url>
      <title>DEV Community: Kelvin Duobu</title>
      <link>https://dev.to/khaekelvin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khaekelvin"/>
    <language>en</language>
    <item>
      <title>How does a webpage get to a user?</title>
      <dc:creator>Kelvin Duobu</dc:creator>
      <pubDate>Thu, 24 Aug 2023 08:40:20 +0000</pubDate>
      <link>https://dev.to/khaekelvin/how-does-a-webpage-get-to-a-user-4adk</link>
      <guid>https://dev.to/khaekelvin/how-does-a-webpage-get-to-a-user-4adk</guid>
      <description>&lt;p&gt;Many things happen between the time a web page is requested and the time it loads completely in your browse.&lt;/p&gt;

&lt;p&gt;• Client Request:&lt;/p&gt;

&lt;p&gt;This process begins when the user enters a URL in the browser. This sends a request from the users device to the server that hosts the page that has been requested. This request is sent through the Hypertext Transfer Protocol.      &lt;/p&gt;

&lt;p&gt;• Domain Name System:&lt;/p&gt;

&lt;p&gt;For the user to efficiently communicate with the server the domain name of the user is translated into an IP address and this process is known as the DNS Resolution. The IP address is the address or location of where the webpage can be found.  Once the IP address has been created, the user is able to establish a connection with the web server.&lt;/p&gt;

&lt;p&gt;• Server Processing:&lt;/p&gt;

&lt;p&gt;The server receives the request and begins processing it. This processing involves making queries, running scripts or accessing resources needed to generate the requested page.&lt;/p&gt;

&lt;p&gt;• Server Responds:&lt;br&gt;
Once the server is done processing, it returns a response to the user. It can return numerous responses such as error responses or successful responses. If the requested page does not exist anymore the server responds with a 404 error (Not found), or if the page has been moved temporarily it returns a 302 and if permanently returns a 301. If there are no errors, the server will respond successfully with a 200, which means OK and the page will be rendered.&lt;/p&gt;

&lt;p&gt;• Browser Renders Page:&lt;/p&gt;

&lt;p&gt;As the browser receives the response, it begins to render the requested page. It receives the HTML file and begins rendering along the CSS and JavaScript files. These are styles and scripts used to display the webpage as intended by the website's design.&lt;/p&gt;

&lt;p&gt;From the client request to server processing, and from DNS resolution to browser rendering, each stage plays a crucial role in delivering the web content we access every day.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Parts of a Browser</title>
      <dc:creator>Kelvin Duobu</dc:creator>
      <pubDate>Wed, 23 Aug 2023 11:01:46 +0000</pubDate>
      <link>https://dev.to/khaekelvin/parts-of-a-browser-1j4h</link>
      <guid>https://dev.to/khaekelvin/parts-of-a-browser-1j4h</guid>
      <description>&lt;p&gt;Web browsers have become a very useful tool in our digital lives, enabling us to access and interact with the information available on the Internet. In this article, we will delve into the essential parts of a web browser and uncover how they collaborate to provide a seamless browsing experience.&lt;/p&gt;

&lt;p&gt;• User Interface (UI)&lt;br&gt;
The user interface is the graphical representation of the browser that users interact with. It includes components like the address bar, navigation buttons, bookmarks, and the settings menu. The UI is designed to be user-friendly, allowing users to navigate the web easily.&lt;/p&gt;

&lt;p&gt;• Address Bar&lt;br&gt;
The address bar, also known as the URL bar, is where users enter the web addresses of the websites they want to visit.&lt;/p&gt;

&lt;p&gt;• Tabs and Windows&lt;br&gt;
Tabs allow users to open multiple web pages within a single browser window. Tabs make multitasking more efficient, as users can switch between different websites without opening multiple browser windows.&lt;/p&gt;

&lt;p&gt;• Rendering Engine&lt;br&gt;
The rendering engine is the heart of a web browser, responsible for displaying the content of web pages. Different browsers use different rendering engines. The rendering engine renders HTML, CSS, and JavaScript to create the visual representation of a webpage. Some examples of rendering engines are Blink (Google Chrome and Microsoft Edge), Gecko (Firefox), WebKit (Safari) and Trident (Internet Explorer).&lt;/p&gt;

&lt;p&gt;• Browser Engine&lt;br&gt;
The browser engine, also known as the layout engine, coordinates with the rendering engine, user interface, and other components. It processes requests from the rendering engine to display web content in the browser window. For instance, the Safari browser uses the Webkit engine, Google uses blink and Firefox uses the Gecko engine.&lt;/p&gt;

&lt;p&gt;• JavaScript Engine&lt;br&gt;
JavaScript is a powerful scripting language used to create interactive and dynamic web content. The JavaScript engine interprets and executes JavaScript code present on web pages. This enables features like form validation, animations, and real-time updates. An example of a JavaScript engine is v8 which is capable of running JS scripts, it powers Chrome, NodeJS, Deno and many others.&lt;/p&gt;

&lt;p&gt;• Extensions and Add-ons&lt;br&gt;
Extensions and add-ons enhance a browser's functionality by adding features and customizations. Extensions are typically built using HTML, CSS, and JavaScript, allowing developers to tailor the browsing experience to their preferences. For example, an Ad Block extension on chrome blocks ads on websites to make the users experience better.&lt;/p&gt;

&lt;p&gt;• Networking&lt;br&gt;
Browsers communicate with web servers over the internet through Transmission Control Protocol/ Internet Protocol to fetch web content. The networking component handles tasks such as establishing connections, sending requests, and receiving responses. It plays a crucial role in loading web pages quickly and efficiently.&lt;/p&gt;

&lt;p&gt;Web browsers are software that brings the internet to our fingertips. They involve the collaboration of various components, each serving a specific purpose that is to provide a seamless browsing experience.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>codenewbie</category>
      <category>frontend</category>
    </item>
    <item>
      <title>What are HTTP status codes?</title>
      <dc:creator>Kelvin Duobu</dc:creator>
      <pubDate>Sun, 13 Aug 2023 14:11:42 +0000</pubDate>
      <link>https://dev.to/khaekelvin/what-are-http-status-codes-4l5d</link>
      <guid>https://dev.to/khaekelvin/what-are-http-status-codes-4l5d</guid>
      <description>&lt;p&gt;Status codes are messages a website's server sends to the browser or system to indicate whether or not a request has been fulfilled.&lt;br&gt;
Categories of status codes:&lt;/p&gt;

&lt;p&gt;• Informational responses (100 – 103): They are messages that alert the user to wait for a final response when the request is processing.&lt;/p&gt;

&lt;p&gt;• Successful responses (200 – 207): This category of status codes indicates the action requested by the client was received, understood, and accepted.&lt;/p&gt;

&lt;p&gt;• Network messages (300 – 308): These messages indicate that the requested content has been moved and will require further action to complete the request.&lt;/p&gt;

&lt;p&gt;• Client side error responses (400 – 499): They are messages that indicate an error caused by the clients input.&lt;/p&gt;

&lt;p&gt;• Server side error responses (500 – 599): They are messages that indicate that the server which the client is trying to access has a problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jtyr34zw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rbkjyghhnmk5gu1ih2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jtyr34zw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rbkjyghhnmk5gu1ih2x.png" alt="Image description" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How a Browser renders a page for a user</title>
      <dc:creator>Kelvin Duobu</dc:creator>
      <pubDate>Fri, 11 Aug 2023 11:35:39 +0000</pubDate>
      <link>https://dev.to/khaekelvin/how-a-browser-renders-a-page-for-a-user-581n</link>
      <guid>https://dev.to/khaekelvin/how-a-browser-renders-a-page-for-a-user-581n</guid>
      <description>&lt;p&gt;In this article I explain the steps your browser takes to convert HTML, CSS, and JavaScript into a working website you can interact with.&lt;/p&gt;

&lt;p&gt;• Receiving the HTML document and Constructing the DOM:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8YXZBAv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9e0xiib5qtvws8fxdid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8YXZBAv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9e0xiib5qtvws8fxdid.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;br&gt;
• Parsing The HTML&lt;br&gt;
In this step the browser receives the HTML file and changes its format into a readable form for the user to understand.&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;index.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="nx"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stylesheet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;style.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Document&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/title&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/head&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Sample&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Sample&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/span&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/html&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;• Fetching External Files:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k4560tyF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le0p3htvuggy72c165eh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k4560tyF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le0p3htvuggy72c165eh.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;index.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="nx"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;stylesheet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;style.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;• Applying CSS:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VZq22VMF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xarbd3giolac4hvb6v4l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VZq22VMF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xarbd3giolac4hvb6v4l.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;font&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="nx"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;font&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bolder&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="nx"&gt;text&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="nx"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS has something called the cascade. The cascade is how the browser determines what styles are applied to an element.&lt;br&gt;
This is important because the browser has to recursively go through the CSS tree structure and determine the styles that affect a particular element.&lt;/p&gt;

&lt;p&gt;• The Render Tree:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W-3ciJT7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t35frql7ziw69v295ae8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W-3ciJT7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t35frql7ziw69v295ae8.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Layout:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZaQm5Clm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2tn6lhobvethumdcz7s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZaQm5Clm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2tn6lhobvethumdcz7s.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Painting:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y3FDMQHk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xveaafo4lukgv11286kj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y3FDMQHk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xveaafo4lukgv11286kj.png" alt="Image description" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• JavaScript:&lt;br&gt;
Most modern websites contain JavaScript now so the browser will have to fetch its files and execute it after rendering the page. JavaScript adds interactivity to the page to enhance user experience. It can trigger animations and fetch data. JavaScript can also remove and add elements from the DOM tree, and you may modify the CSSOM properties of an element via JavaScript as well.&lt;/p&gt;

&lt;p&gt;In conclusion, the process of how a browser renders a webpage is complex, involving different components within the browser. From parsing and constructing the DOM to applying CSS styles, calculating layouts, and executing JavaScript, each step plays a vital role in transforming raw code into the visually appealing and interactive web pages we interact with daily&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Semantics Tags in HTML</title>
      <dc:creator>Kelvin Duobu</dc:creator>
      <pubDate>Wed, 09 Aug 2023 18:48:07 +0000</pubDate>
      <link>https://dev.to/khaekelvin/semantics-tags-in-html-onb</link>
      <guid>https://dev.to/khaekelvin/semantics-tags-in-html-onb</guid>
      <description>&lt;h1&gt;
  
  
  What are HTML Semantics?
&lt;/h1&gt;

&lt;p&gt;HTML semantics refer to the practice of using HTML tags in a way that conveys meaningful information about the content they enclose.  Semantic HTML emphasizes on providing structure and context to a website. By using the right semantic tags, developers can better describe the making it easy for both humans and machines to understand the content's significance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of non-semantic elements:&lt;/strong&gt; &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; - Tells nothing about its content.&lt;br&gt;
&lt;strong&gt;Examples of semantic elements:&lt;/strong&gt; &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;- Clearly defines its content.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why do we use them?
&lt;/h2&gt;

&lt;p&gt;• &lt;strong&gt;Code Readability:&lt;/strong&gt;&lt;br&gt;
Semantic HTML enhances the readability and maintainability of code. The use of semantic tags in our code allows our code to make more sense and as our project grows, it helps us orient ourselves.&lt;br&gt;
• &lt;strong&gt;Makes our site more accessible:&lt;/strong&gt;&lt;br&gt;
Semantic HTML tags have imbedded accessibility constructs that enable users with disabilities to make use assistive technologies such as screen readers and screen magnifiers.&lt;br&gt;
• &lt;strong&gt;Content Organization:&lt;/strong&gt;&lt;br&gt;
Semantic HTML helps in organizing the content of the site in a meaningful order with the use of appropriate tags. Developers can structure the content hierarchically, making it easier for users to grasp information&lt;/p&gt;
&lt;h3&gt;
  
  
  HTML Semantic elements
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tags&lt;/th&gt;
&lt;th&gt;Explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;article&lt;/td&gt;
&lt;td&gt;The  element specifies independent, self-contained content.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;nav&lt;/td&gt;
&lt;td&gt;The  element defines a set of navigation links.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aside&lt;/td&gt;
&lt;td&gt;The  element defines some content aside from the main content it is placed in (like a sidebar).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;section&lt;/td&gt;
&lt;td&gt;It represents the section of the document.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;details&lt;/td&gt;
&lt;td&gt;It specifies the tag for additional details.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;header&lt;/td&gt;
&lt;td&gt;The  element represents a container for introductory content or a set of navigational links.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;footer&lt;/td&gt;
&lt;td&gt;The  element defines a footer for a document or section&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;main&lt;/td&gt;
&lt;td&gt;This specifies the main page content and should be unique&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;summary&lt;/td&gt;
&lt;td&gt;This specifies a header for the  element.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mark&lt;/td&gt;
&lt;td&gt;This specifies the text that is highlighted.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Examples and when they are used
&lt;/h3&gt;

&lt;p&gt;• &lt;strong&gt;Article:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;article&amp;gt;
        &amp;lt;h1&amp;gt;Article Title&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;This is the content of the article.&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;It can have multiple paragraphs and other elements.&amp;lt;/p&amp;gt;
    &amp;lt;/article&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgyher540tt3qgco2r9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgyher540tt3qgco2r9z.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The  element is used to explain a self-contained piece of content, like a blog post or news article.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Header and Nav:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;Website Title&amp;lt;/h1&amp;gt;
        &amp;lt;nav&amp;gt;
            &amp;lt;ul&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href="/"&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href="/about"&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
                &amp;lt;li&amp;gt;&amp;lt;a href="/contact"&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;
        &amp;lt;/nav&amp;gt;
    &amp;lt;/header&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The  element is used to define the header section of a webpage, typically containing the site's title, logo, and main navigation and the  element represents a navigation menu and contains links to different sections or pages of a website.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Aside:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;aside&amp;gt;
        &amp;lt;h2&amp;gt;Related Articles&amp;lt;/h2&amp;gt;
        &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/article1"&amp;gt;Article 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/article1"&amp;gt;Article 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/aside&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The  element is used for content that is not related to the main content but provides some information.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Details and Summary:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;details&amp;gt;
        &amp;lt;summary&amp;gt;Click to expand&amp;lt;/summary&amp;gt;
        &amp;lt;p&amp;gt;Hidden content revealed when the details are expanded.&amp;lt;/p&amp;gt;
    &amp;lt;/details&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;This element allows us to create accordions. It's particularly useful for displaying a list of items, conserving screen space and providing a neat way to organize and present information.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Footer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;p&amp;gt;Contact us at contact@example.com&amp;lt;/p&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/privacy"&amp;gt;privacy Policy&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href="/terms"&amp;gt;Terms of Service&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
&amp;lt;/footer&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The  element represents the footer section of a webpage, typically containing contact information, copyright notices, and secondary navigation.&lt;/p&gt;

&lt;p&gt;• &lt;strong&gt;Main:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;main&amp;gt;
        &amp;lt;h1&amp;gt;Main Content&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;This is the main content of the webpage.&amp;lt;/p&amp;gt;
    &amp;lt;/main&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The  element is used to define the main content area of a webpage, excluding headers, footers, and sidebars. There can only be one main element on the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample layout:
&lt;/h3&gt;



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

&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Semantic HTML layout&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

    &amp;lt;header&amp;gt;

    &amp;lt;/header&amp;gt;

    &amp;lt;main&amp;gt;

    &amp;lt;/main&amp;gt;

    &amp;lt;footer&amp;gt;

    &amp;lt;/footer&amp;gt;

&amp;lt;/body&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;By using the appropriate semantic elements, web developers can create more meaningful and well-organized documents for both humans and assistive technologies.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
