<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HTML Foundations: From Tags to Structure]]></title><description><![CDATA[HTML Foundations: From Tags to Structure]]></description><link>https://html-foundations-from-tags-to-structure.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 13:32:24 GMT</lastBuildDate><atom:link href="https://html-foundations-from-tags-to-structure.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[HTML: The Skeleton of Every Webpage]]></title><description><![CDATA[Introduction
Every website you have ever visited like Google, YouTube, Instagram, or even this page, starts with one thing HTML.
Before colors, animations exist, a browser needs to understand what each part of content is, like is this a heading or a ...]]></description><link>https://html-foundations-from-tags-to-structure.hashnode.dev/html-the-skeleton-of-every-webpage</link><guid isPermaLink="true">https://html-foundations-from-tags-to-structure.hashnode.dev/html-the-skeleton-of-every-webpage</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[HTML5]]></category><dc:creator><![CDATA[Saksham Kumar]]></dc:creator><pubDate>Tue, 27 Jan 2026 12:24:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769516626613/103d3d40-50c4-4d1b-92fb-0a9b2b426f88.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>Every website you have ever visited like Google, YouTube, Instagram, or even this page, starts with one thing HTML.</p>
<p>Before colors, animations exist, a browser needs to understand what each part of content is, like is this a heading or a paragraph? That understanding comes from HTML</p>
<p>In this blog, we will break HTML into its core concepts like tags, elements, blocks and inline layout.</p>
<p>By the end, you won’t be just writing HTML, you will read websites like a browser does.</p>
<hr />
<h2 id="heading-what-is-html">What is HTML</h2>
<p>HTML stands for Hyper Text Markup Language and it is not a programming language. So it doesn’t think, calculate, or decide. HTML’s only job is to describe the structure of a webpage.</p>
<p>You can think of webpage like a human body where,</p>
<ul>
<li><p>HTML =&gt; Skeleton</p>
</li>
<li><p>CSS =&gt; Skin</p>
</li>
<li><p>JavaScript =&gt; Brain</p>
</li>
</ul>
<p>Without HTML, the browser has no idea what is going on.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769511682412/2dc18b50-7d3e-45cc-a954-bea27496ef48.png" alt class="image--center mx-auto" /></p>
<blockquote>
<p>HTML tells the browser what each thing is on the page.</p>
</blockquote>
<hr />
<h2 id="heading-what-is-an-html-tag">What is an HTML tag</h2>
<p>A tag is a label which is written inside brackets <code>&lt; &gt;</code>.</p>
<p>Example:-</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>This tells browser that the thing inside are going to be a paragraph.</p>
<p>So, you can say that tags are instructions and not the content. The browser doesn’t show tags to user. It uses these tags to understand the structure of the content.</p>
<h2 id="heading-opening-tag-content-and-closing-tag">Opening Tag, Content, And Closing Tag</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769511907170/9c84f507-ec55-4b43-8460-9e710d272305.png" alt class="image--center mx-auto" /></p>
<p>Most HTML elements works in pairs except void tags.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>The reason why closing tags exist because the browser needs to know where something starts and where it ends. Without closing tags, the browser would be very confused. It would say “is everything after this a paragraph forever?”.</p>
<hr />
<h2 id="heading-html-element">HTML Element</h2>
<p>This is the actual part where most of the beginners get confused. So let’s make it crystal clear.</p>
<ul>
<li><h3 id="heading-tag">Tag:-</h3>
<p>  As, we have already understood that tag is just the label.</p>
</li>
<li><h3 id="heading-element">Element:-</h3>
<p>  An element is a complete unit in HTML. It consists of an opening tag, content, and a closing tag( as shown in the above diagram).</p>
<p>  Example:-</p>
</li>
</ul>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<hr />
<h2 id="heading-void-elements">Void elements</h2>
<p>It is also known as self-closing elements because there is nothing to put inside them. They also don’t have closing tags because they don’t wrap any content.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"photo.jpg"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">hr</span>&gt;</span>
</code></pre>
<p>Clearly, you can see <strong>hat</strong> <code>img</code>, <code>br</code>, and <code>hr</code> are the content itself. That is why they don’t need closing tags.</p>
<p>Some famous void elements:-</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Element</td><td>Purpose</td></tr>
</thead>
<tbody>
<tr>
<td><code>&lt;img&gt;</code></td><td>Image</td></tr>
<tr>
<td><code>&lt;br&gt;</code></td><td>Line break</td></tr>
<tr>
<td><code>&lt;hr&gt;</code></td><td>Horizontal line</td></tr>
<tr>
<td><code>&lt;input&gt;</code></td><td>Input field</td></tr>
<tr>
<td><code>&lt;meta&gt;</code></td><td>Page metadata</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-block-level-and-inline-elements">Block-level And Inline elements</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769513563518/6aa9ddd5-faba-4d03-a131-c52b7a839d1c.png" alt class="image--center mx-auto" /></p>
<ul>
<li><h3 id="heading-block-level-elements">Block-Level Elements</h3>
<p>  Block elements are those elements which start on a new line, take up the full available width of their parent/container, and naturally they stack vertically on the page which means each block element will be below the previous one.</p>
<p>  For example:-</p>
<pre><code class="lang-xml">  <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Title<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Paragraph<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>Box<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
</li>
<li><h3 id="heading-inline-elements">Inline Elements</h3>
<p>  Inline elements are those elements that stay within the same line of text, and only take much width as their content needs and also flow naturally with surrounding text instead of breaking the layout. You can think of inline elements as words or parts of a sentence.</p>
<p>  For example;-</p>
<pre><code class="lang-xml">  <span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>word<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>bold<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">a</span>&gt;</span>link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
</code></pre>
</li>
</ul>
<hr />
<h2 id="heading-commonly-used-html-tags">Commonly used HTML tags</h2>
<ol>
<li><h3 id="heading-text-amp-structure">Text &amp; structure</h3>
</li>
</ol>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span> to <span class="hljs-tag">&lt;<span class="hljs-name">h6</span>&gt;</span> //headings
<span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span> //paragraph
<span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span> //inline text
<span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span> //importance
<span class="hljs-tag">&lt;<span class="hljs-name">bold</span>&gt;</span> //bold
</code></pre>
<ol start="2">
<li><h3 id="heading-layout-containers">Layout containers</h3>
</li>
</ol>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>//block-level container
</code></pre>
<ol start="3">
<li><h3 id="heading-media">Media</h3>
</li>
</ol>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">""</span>&gt;</span> //image
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">""</span>&gt;</span> //link
</code></pre>
<ol start="4">
<li><h3 id="heading-basic-page-structure-semantic-tags0">Basic Page Structure (semantic tags0</h3>
</li>
</ol>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">header</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">main</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">footer</span>&gt;</span>
</code></pre>
<hr />
<h2 id="heading-html-as-a-sentence">HTML As A Sentence</h2>
<p>HTML works like grammar in a language where a paragraph element(<code>&lt;p&gt;</code>) gives a structure like where the content starts and ends, while inline elements inside it like <code>&lt;span&gt;</code> or <code>&lt;strong&gt;</code> add meaning, act like emphasis on specific words within that sentence.</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is a <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>very<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> important word.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>This means HTML only focuses on what the content is and how it is being structured.</p>
<hr />
<h2 id="heading-inspecting-browser">Inspecting Browser</h2>
<p>Inspecting HTML in the browser lets you see the how browser sees the web page.</p>
<ul>
<li><p>Open any website</p>
</li>
<li><p>Right-click then <strong>Inspect</strong></p>
</li>
<li><p>In the Elements tab</p>
</li>
<li><p>You’ll see:-</p>
<ul>
<li><p>Tags</p>
</li>
<li><p>Elements</p>
</li>
<li><p>Nesting</p>
</li>
<li><p>Structure</p>
</li>
</ul>
</li>
</ul>
<blockquote>
<p>Fun fact: you can literally fork any webpage’s structure like Youtube, Google, and etc by just inspecting a browser.</p>
</blockquote>
<hr />
<h2 id="heading-conclusion">Conclusion</h2>
<p>HTML is not about design or effects. It is about structure and meaning where tags act as labels, elements form a complete unit of content, block elements shape the layout, and last but not the least inline elements give meaning to specific parts of text.</p>
<p>While browser reads and interprets this structure behind the scenes.</p>
<p>That’s it.</p>
<p>You can go now, Bye bye</p>
]]></content:encoded></item></channel></rss>