<?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://shubh-html-emmet.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 13:17:34 GMT</lastBuildDate><atom:link href="https://shubh-html-emmet.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[Imagine i have three list items in html without emmet<ul><li class=”item1”><li><li class=”item1”><li><li class=”item1”><li></ul>
without Emmet

Type every tag (<ul>, <li>, </li>, </ul>)

Add every class and number by hand

Move the cursor multiple ti...]]></description><link>https://shubh-html-emmet.hashnode.dev/emmet-for-html-a-beginners-guide-to-writing-faster-markup</link><guid isPermaLink="true">https://shubh-html-emmet.hashnode.dev/emmet-for-html-a-beginners-guide-to-writing-faster-markup</guid><category><![CDATA[HTML]]></category><category><![CDATA[html emmet]]></category><category><![CDATA[#html #beginner]]></category><category><![CDATA[Html, beginners, coding ,learning]]></category><dc:creator><![CDATA[Shubham Mourya]]></dc:creator><pubDate>Fri, 30 Jan 2026 15:39:46 GMT</pubDate><content:encoded><![CDATA[<p>Imagine i have three list items in html without emmet<br />&lt;ul&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;/ul&gt;</p>
<p>without Emmet</p>
<ul>
<li><p>Type every tag (&lt;ul&gt;, &lt;li&gt;, &lt;/li&gt;, &lt;/ul&gt;)</p>
</li>
<li><p>Add every class and number by hand</p>
</li>
<li><p>Move the cursor multiple times</p>
</li>
</ul>
<p>This is fine for small snippets, but becomes very slow for</p>
<ul>
<li><p>Forms with many fields</p>
</li>
<li><p>Navigation menus</p>
</li>
<li><p>Repeated cards, sections, or list items</p>
</li>
</ul>
<p>Emmet solves this you write a short “code sentence” (abbreviation) and expand it into full HTML.</p>
<p><strong>Emmet</strong><br />Emmet is a shortcut language for writing HTML and CSS.</p>
<p>ex:- ul&gt;li.item*3</p>
<p>Then press the Emmet expand key usually Tab in VS Code, and it becomes<br />&lt;ul&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;li class=”item1”&gt;&lt;li&gt;<br />&lt;/ul&gt;</p>
<p>Emmet is optional you can write HTML without it. But once you get used to it, it makes everyday HTML much faster and less repetitive.</p>
<p><strong>How Emmet works inside a code editor</strong></p>
<p>Most modern editors (like VS Code) have Emmet built-in.</p>
<p>flow:-</p>
<ol>
<li><p>You type an Emmet abbreviation, for example: ul&gt;li*3</p>
</li>
<li><p>Your cursor is at the end of the abbreviation.</p>
</li>
<li><p>You press the expand key (often Tab or Enter depending on settings).</p>
</li>
<li><p>The editor sends that text to Emmet.</p>
</li>
<li><p>Emmet understands the mini-language and generates full HTML.</p>
</li>
<li><p>The editor replaces your abbreviation with the expanded HTML.</p>
</li>
</ol>
<p><strong>Basic Emmet syntax and abbreviations</strong></p>
<ol>
<li><p>Single Elements</p>
</li>
<li><p>Adding classes ( . ) and IDs ( # )</p>
</li>
</ol>
<p><strong>Creating HTML elements using Emmet</strong>  </p>
<p>1. A div with a class</p>
<p>div.card expands to → &lt;div class=”card”&gt;&lt;/div&gt;  </p>
<p>2. A link (a) with href and text<br />Use {} for text content (inner text).</p>
<p>a[href="#"]{Click me} to → &lt;a href="#“&gt;Click me&lt;/a&gt;  </p>
<p>3. Input and label</p>
<p>label[for="email"]{Email:}+input#email[type="email"]<br />expand to:-  </p>
<p>&lt;label for=”email”&gt;Email:&lt;/label&gt;<br />&lt;input id=”email” type=”email”&gt;</p>
<p><strong>Adding classes, IDs, and attributes</strong>  </p>
<p><strong>1.</strong> Class ( . ) and ID (#)</p>
<p>span.highlight → &lt;span class=”height”&gt;&lt;/span&gt;</p>
<p>input#username → &lt;input id=”username”&gt;  </p>
<p>2. Attributes with [ ]</p>
<p>img[src="photo.jpg" alt="photo"] → &lt;img src=”photo.jpg” "alt=”photo”&gt;  </p>
<p>3. Text content with { }</p>
<p>p{Hello world} → &lt;p&gt; Hello world &lt;/p&gt;</p>
<p><strong>Creating nested elements</strong>  </p>
<p><strong>1.</strong> Simple nesting</p>
<p>ul&gt;li → &lt;ul&gt;&lt;li&gt;&lt;li&gt;&lt;/ul&gt;  </p>
<p>2. Multiple nesting</p>
<p>nav&gt;ul&gt;li<br />to → &lt;nav&gt;<br />&lt;ul&gt;<br />&lt;li&gt;&lt;/li&gt;<br />&lt;/ul&gt;<br />&lt;/nav&gt;  </p>
<p>3. Adding classes inside the structure</p>
<p>nav.navbar&gt;ul.menu&gt;li.item</p>
<p>to → &lt;nav class=”navbar”&gt;<br />&lt;ul class=”menu”&gt;<br />&lt;li class=”item”&gt;&lt;/li&gt;<br />&lt;/ul&gt;<br />&lt;/nav&gt;</p>
<p><strong>Generating full HTML boilerplate with Emmet</strong>  </p>
<p><strong>!</strong> to → &lt;!DOCTYPE html&gt;<br />&lt;html lang="en"&gt;<br />&lt;head&gt;<br />&lt;meta charset="UTF-8"&gt;<br />&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;<br />&lt;title&gt;Document&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;  </p>
<p>&lt;/body&gt;<br />&lt;/html&gt;</p>
]]></content:encoded></item></channel></rss>