<?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 Basics: Tags & Elements Made Easy]]></title><description><![CDATA[HTML Basics: Tags & Elements Made Easy]]></description><link>https://html-basics-tags-and-elements-made-easy.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 24 Jun 2026 18:51:40 GMT</lastBuildDate><atom:link href="https://html-basics-tags-and-elements-made-easy.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[1.What HTML is and why we use it
HTML's full form is HyperText Markup Language. HTML is a language with which we create web pages. That means whenever you open any website, its basic structure is made with HTML.
Why Do We Use HTML
In web development,...]]></description><link>https://html-basics-tags-and-elements-made-easy.hashnode.dev/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://html-basics-tags-and-elements-made-easy.hashnode.dev/understanding-html-tags-and-elements</guid><category><![CDATA[tags]]></category><category><![CDATA[elements]]></category><category><![CDATA[HTML]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Akmal Faiz]]></dc:creator><pubDate>Wed, 28 Jan 2026 06:48:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769582857673/263c019c-3466-45b6-a8e8-304d4552c3db.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1what-html-is-and-why-we-use-it">1.What HTML is and why we use it</h2>
<p>HTML's full form is HyperText Markup Language. HTML is a language with which we create web pages. That means whenever you open any website, its basic structure is made with HTML.</p>
<p><strong>Why Do We Use HTML</strong></p>
<p>In web development, HTML provides the structure; we add styling with CSS and interactivity with JavaScript. It gives search engines the context of the page for SEO, and every website—from blogs to e-commerce—is based on it. Without HTML, web pages would just be plain text, with no proper layout.</p>
<h2 id="heading-2-what-an-html-tag-is">2. What an HTML tag is</h2>
<p>HTML tags are usually written in angle brackets &lt; &gt;, like &lt;p&gt; or &lt;h1&gt;. These are called opening tags, and they end with a closing tag &lt;/p&gt; or &lt;/h1&gt; with a slash. Both together make a complete element that wraps text, images, or links.</p>
<h2 id="heading-3-opening-tag-closing-tag-and-content">3. Opening tag, closing tag, and content</h2>
<h3 id="heading-what-is-an-opening-tag">What is an Opening Tag</h3>
<p>The opening tag starts the element in angle brackets &lt; &gt;, like &lt;p&gt; or &lt;h1&gt;. It tells the browser that a new section of content is starting now.</p>
<h3 id="heading-what-is-a-closing-tag">What is a Closing Tag</h3>
<p>The closing tag ends the element, just like the opening tag but with a forward slash /, like &lt;/p&gt; or &lt;/h1&gt;. Without a closing tag, the browser gets confused and the page might display incorrectly.</p>
<h3 id="heading-role-of-content">Role of Content</h3>
<p>Whatever text, image, or other element is between the opening and closing tags is called content. This is the thing that actually shows up on the web page.</p>
<h2 id="heading-4-what-an-html-element-means">4. What an HTML element means</h2>
<h3 id="heading-what-is-an-element">What is an Element</h3>
<p>An HTML element is the complete structure—like &lt;p&gt;My text here&lt;/p&gt;—where &lt;p&gt; is the opening tag, "My text here" is the content, and &lt;/p&gt; is the closing tag. It tells the browser to display the content as a paragraph.</p>
<h2 id="heading-5-self-closing-void-elements">5. Self-closing (void) elements</h2>
<p>Self-closing or void elements in HTML are tags that don't need a separate closing tag (like &lt;/div&gt;). These elements don't hold content; they only hold attributes (like src, href). Examples include<br />, &lt;img&gt;, &lt;input&gt;, &lt;meta&gt;, and &lt;hr&gt;.</p>
<h2 id="heading-6-block-level-vs-inline-elements">6. Block-level vs inline elements</h2>
<h3 id="heading-block-level-elements">Block-Level Elements</h3>
<p>These elements always start on a new line and take up the full width (stretch from left to right). The browser automatically adds margins above and below. Common examples: &lt;div&gt;, &lt;p&gt;, &lt;h1&gt; to &lt;h6&gt;, &lt;ul&gt;, &lt;li&gt;. They're used for sections, paragraphs, or containers.</p>
<h3 id="heading-inline-elements">Inline Elements</h3>
<p>These stay on the same line, take only the width needed for their content, and don't start a new line. Examples: &lt;span&gt;, &lt;a&gt;, &lt;strong&gt;, &lt;em&gt;, &lt;img&gt;. Perfect for styling inside text or links.</p>
<h2 id="heading-7-commonly-used-html-tags">7. Commonly used HTML tags</h2>
<p>The commonly used tags in HTML are the basic building blocks essential for creating every web page.</p>
<h3 id="heading-document-structure-tags">Document Structure Tags</h3>
<p>These form the overall skeleton of the page:</p>
<p>&lt;html&gt;: Wraps the entire document. &lt;head&gt;: Title, meta info, links (CSS/JS) go here. &lt;title&gt;: Shows the page name in the browser tab. &lt;body&gt;: The content that actually appears.</p>
<h3 id="heading-text-formatting-tags">Text Formatting Tags</h3>
<p>For organizing and styling content:</p>
<p>&lt;h1&gt; to &lt;h6&gt;: Create headings (h1 is the largest). &lt;p&gt;: For paragraphs. &lt;strong&gt; or &lt;b&gt;: Bold text. &lt;em&gt; or &lt;i&gt;: Italic text. &lt;br&gt;: Line break (self-closing).</p>
<h3 id="heading-lists-and-links">Lists and Links</h3>
<p>&lt;ul&gt; and &lt;li&gt;: Unordered (bullet) list. &lt;ol&gt; and &lt;li&gt;: Ordered (numbered) list. &lt;a href="url"&gt;: Creates a hyperlink.</p>
<p><strong>Media and Layout</strong><br />&lt;img src="photo.jpg" alt="desc"&gt;: Adds an image (self-closing).</p>
<p>&lt;div&gt;: For container/block sections. &lt;span&gt;: For inline styling.</p>
<hr />
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769582529631/89429117-893d-4510-bc6c-6622f4060445.webp" alt class="image--center mx-auto" /></p>
]]></content:encoded></item></channel></rss>