<?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[Emmet for HTML]]></title><description><![CDATA[Emmet for HTML]]></description><link>https://emmet-for-html-rakeshmehta.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 12:01:58 GMT</lastBuildDate><atom:link href="https://emmet-for-html-rakeshmehta.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Emmet for HTML: A Beginner’s Guide to Writing Faster Markup]]></title><description><![CDATA[Introduction: Writing HTML Without Emmet
When we as a beginner start learning HTML, writing code often feels slow and repetitive.
Example without Emmet

We must have to type every tag, angle bracket, and closing tag manually. This take our so much ti...]]></description><link>https://emmet-for-html-rakeshmehta.hashnode.dev/emmet-for-html-a-beginners-guide-to-writing-faster-markup</link><guid isPermaLink="true">https://emmet-for-html-rakeshmehta.hashnode.dev/emmet-for-html-a-beginners-guide-to-writing-faster-markup</guid><category><![CDATA[htmlemmet]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Rakesh Mehta]]></dc:creator><pubDate>Sun, 01 Feb 2026 16:40:44 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-introduction-writing-html-without-emmet"><strong>Introduction: Writing HTML Without Emmet</strong></h2>
<p>When we as a beginner start learning HTML, writing code often feels slow and repetitive.</p>
<p><strong>Example without Emmet</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769950600770/404e4812-c037-4c47-af51-36c72adab877.png" alt /></p>
<p>We must have to type every tag, angle bracket, and closing tag manually. This take our so much time and increase the chances of mistakes.</p>
<p>This is the time where Emmet helps. So What is Emmet ?</p>
<h2 id="heading-why-emmet-is-useful-for-html-beginners"><strong>Why Emmet is useful for HTML beginners</strong></h2>
<p><strong>Emmet is a shortcut syntax for HTML code or Syntax.</strong></p>
<p>Instead of writing full HTML code for multiple times, we type a short abbreviation, and the editor automatically expands it into complete HTML.</p>
<p>Overall Emmet is a shorthand typing for HTML. We write less but we get more code with the help of Emmet.</p>
<h2 id="heading-how-emmet-works-inside-code-editors"><strong>How Emmet Works Inside Code Editors</strong></h2>
<p>Emmet is built into code editor VS Code.</p>
<h3 id="heading-how-it-works"><strong>How it works:</strong></h3>
<ol>
<li><p>We directly type an Emmet abbreviation on the VS Code</p>
</li>
<li><p>Press <strong>Enter</strong> or <strong>Tab</strong></p>
</li>
<li><p>The editor expands it into <strong>HTML code</strong></p>
</li>
</ol>
<p>We do not have to install anything separately in VS Code.</p>
<h2 id="heading-basic-emmet-syntax-one-concept-at-a-time"><strong>Basic Emmet Syntax (One Concept at a Time)</strong></h2>
<h3 id="heading-creating-html-elements"><strong>Creating HTML Elements</strong></h3>
<p>When we want to type the particular tag we type just the tag syntax without any <code>&lt;&gt;</code> .</p>
<p><strong>Emmet abbreviation → Expanded HTML</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769951660671/935ce0bb-68e7-472f-ae3f-ae3bda7a6b8d.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769951903971/3d9b802c-fc34-4e7d-8550-e30ad6f50c77.png" alt /></p>
<p>Similarly we type different types of tags abbreviation for the particular element.</p>
<h3 id="heading-adding-classes"><strong>Adding Classes</strong></h3>
<p>Use a <strong>dot ( . )</strong> for class.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952119068/e786bf20-147f-49ed-a427-fd88701f067d.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952165669/ef9a4255-32a0-4bb8-b50d-22b2e6a2b746.png" alt /></p>
<h3 id="heading-adding-ids"><strong>Adding IDs</strong></h3>
<p>Use a <strong>hash ( # )</strong> for id.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952238354/361a9579-517c-40cf-8ae7-2faa67a041b0.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952261466/f1cb1ba8-0807-45cb-886f-98849a7d3d77.png" alt /></p>
<h3 id="heading-adding-attributes"><strong>️Adding Attributes</strong></h3>
<p>Use <strong>square brackets [ ]</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952345281/650a154a-400a-47d0-ab63-ca8181fbe1b4.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952375216/ab099b95-7426-47c0-8376-3ebc961bdc45.png" alt /></p>
<h2 id="heading-creating-nested-elements"><strong>Creating Nested Elements</strong></h2>
<p>Use the <strong>greater than symbol ( &gt; )</strong> to nesting of the elements.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952575938/b2728cee-7c81-488d-ade8-5ce7ff032b8a.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952597163/03ad7fb4-16c0-4af7-9899-cb6500812a41.png" alt /></p>
<h2 id="heading-example-with-multiple-levels"><strong>Example with multiple levels</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952719069/ce5ed174-3604-48be-a88a-1617e93e95c3.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952756821/5dc18c95-b881-4b6f-97a2-3ca8d9a34825.png" alt /></p>
<h2 id="heading-repeating-elements-using-multiplication"><strong>Repeating Elements Using Multiplication</strong></h2>
<p>Use the <strong>asterisk ( * )</strong> to repeat elements as much as how many times you want.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952846281/69c29c9d-0348-4351-a5ae-5086e6809e01.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952876961/8b42f0dc-b1e7-4317-8400-25757b3e68a0.png" alt /></p>
<h3 id="heading-nested-repeated"><strong>Nested + repeated</strong></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952959093/77b2327d-8d07-432c-a763-de5289768449.png" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769952985376/bc760f74-b70c-4b6f-98e7-283d8b2152a5.png" alt /></p>
<h2 id="heading-generating-full-html-boilerplate-with-emmet"><strong>Generating Full HTML Boilerplate with Emmet</strong></h2>
<p>This is one of the most useful Emmet features.</p>
<p><strong>Just type:</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769953050788/82cf949d-50f5-40cb-be0d-3fd54cbdf39b.png" alt /></p>
<p>Press <strong>Enter</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769953127492/d5393786-c208-42a7-97bb-4880a7f3e6b2.png" alt /></p>
<p>In one Enter, entire HTML structure is ready.</p>
<h2 id="heading-emmet-abbreviation-html-expansion-flow"><strong>Emmet Abbreviation → HTML Expansion Flow</strong></h2>
<p>For using the Emmet abbreviation first we need to create the html file then the Emmet will work.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769953868316/7c262a87-7f44-4ecf-9a96-e37b1ce8bfcd.png" alt /></p>
]]></content:encoded></item></channel></rss>