<?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 In HTML]]></title><description><![CDATA[Emmet In HTML]]></description><link>https://emmet-and-html.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 05:04:02 GMT</lastBuildDate><atom:link href="https://emmet-and-html.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Write HTML at the Speed of Light]]></title><description><![CDATA[Welcome back to The Tech Tales.
In our recent blogs, we learned HTML (the skeleton) and CSS Selectors (how to point at the skeleton).
But let’s be honest: writing HTML is exhausting. Typing <div>, then the content, then </div>. Then doing it again. A...]]></description><link>https://emmet-and-html.hashnode.dev/how-to-write-html-at-the-speed-of-light</link><guid isPermaLink="true">https://emmet-and-html.hashnode.dev/how-to-write-html-at-the-speed-of-light</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Emmet]]></category><category><![CDATA[HTML5]]></category><dc:creator><![CDATA[Shaikh Ubed]]></dc:creator><pubDate>Sun, 01 Feb 2026 18:22:24 GMT</pubDate><content:encoded><![CDATA[<p>Welcome back to <em>The Tech Tales</em>.</p>
<p>In our recent blogs, we learned HTML (the skeleton) and CSS Selectors (how to point at the skeleton).</p>
<p>But let’s be honest: writing HTML is <strong>exhausting</strong>. Typing <code>&lt;div&gt;</code>, then the content, then <code>&lt;/div&gt;</code>. Then doing it again. And again. The <code>&lt;</code> and <code>&gt;</code> keys on your keyboard probably hate you by now.</p>
<p>What if I told you that you could type a simple abbreviation like <code>ul&gt;li*5</code> and the computer would instantly write 10 lines of code for you?</p>
<p>This isn't magic. It's <strong>Emmet</strong>.</p>
<h3 id="heading-what-is-emmet">What is Emmet?</h3>
<p>Emmet is a plugin that comes pre-installed in most modern code editors (like VS Code).</p>
<p>Think of Emmet as <strong>Auto-Correct</strong> or <strong>Text Expansion</strong> for coders.</p>
<ul>
<li><p><strong>Real Life:</strong> You type "OMW", your phone expands it to "On my way!"</p>
</li>
<li><p><strong>Coding:</strong> You type <code>h1</code>, Emmet expands it to <code>&lt;h1&gt;&lt;/h1&gt;</code>.</p>
</li>
</ul>
<p>It turns you from a slow typist into a code generator.</p>
<h3 id="heading-1-the-basics-tags-classes-and-ids">1. The Basics: Tags, Classes, and IDs</h3>
<p>You don't need to memorize complex commands. Emmet uses the exact same syntax as the <strong>CSS Selectors</strong> we learned in the last blog!</p>
<p><strong>The Element</strong></p>
<ul>
<li><p><strong>You Type:</strong> <code>div</code> (then hit Tab or Enter)</p>
</li>
<li><p><strong>Emmet Writes:</strong> <code>&lt;div&gt;&lt;/div&gt;</code></p>
</li>
</ul>
<p><strong>The Class (</strong><code>.</code>)</p>
<ul>
<li><p><strong>You Type:</strong> <code>.container</code></p>
</li>
<li><p><strong>Emmet Writes:</strong> <code>&lt;div class="container"&gt;&lt;/div&gt;</code> <em>(Note: If you don't specify a tag, Emmet assumes you mean a div).</em></p>
</li>
</ul>
<p><strong>The ID (</strong><code>#</code>)</p>
<ul>
<li><p><strong>You Type:</strong> <code>#navbar</code></p>
</li>
<li><p><strong>Emmet Writes:</strong> <code>&lt;div id="navbar"&gt;&lt;/div&gt;</code></p>
</li>
</ul>
<p><strong>Combining Them</strong></p>
<ul>
<li><p><strong>You Type:</strong> <code>p.text-bold</code></p>
</li>
<li><p><strong>Emmet Writes:</strong> <code>&lt;p class="text-bold"&gt;&lt;/p&gt;</code></p>
</li>
</ul>
<h3 id="heading-2-nesting-the-child-gt">2. Nesting: The Child (<code>&gt;</code>)</h3>
<p>HTML is a tree. You have parents and children. Emmet lets you build the whole family at once using the "Greater Than" symbol <code>&gt;</code>.</p>
<ul>
<li><p><strong>You Type:</strong> <code>div&gt;ul&gt;li</code></p>
</li>
<li><p><strong>Emmet Writes:</strong></p>
<p>  HTML</p>
<pre><code class="lang-plaintext">  &lt;div&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
</code></pre>
</li>
<li><p><strong>Analogy:</strong> You are telling Emmet: <em>"Create a box, inside that put a list, and inside that put an item."</em></p>
</li>
</ul>
<h3 id="heading-3-multiplication-the-star">3. Multiplication: The Star (<code>*</code>)</h3>
<p>This is the best feature. If you need a list with 5 items, don't copy-paste the line 5 times. Just use math.</p>
<ul>
<li><p><strong>You Type:</strong> <code>li*5</code></p>
</li>
<li><p><strong>Emmet Writes:</strong></p>
<p>  HTML</p>
<pre><code class="lang-plaintext">  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
</code></pre>
</li>
</ul>
<h3 id="heading-4-grouping-the-complex-workflow">4. Grouping: The Complex Workflow</h3>
<p>Let's combine everything we just learned into one "Power Move." Imagine you want a navigation bar (<code>nav</code>) with an unordered list (<code>ul</code>) containing 4 links (<code>a</code>).</p>
<ul>
<li><p><strong>The Old Way:</strong> Typing 15 separate tags manually.</p>
</li>
<li><p><strong>The Emmet Way:</strong> <code>nav&gt;ul&gt;li*4&gt;a</code></p>
</li>
</ul>
<p><strong>Result:</strong></p>
<p>HTML</p>
<pre><code class="lang-plaintext">&lt;nav&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/nav&gt;
</code></pre>
<p>You just wrote that in 3 seconds.</p>
<h3 id="heading-5-the-ultimate-shortcut-the-boilerplate">5. The Ultimate Shortcut: The Boilerplate (<code>!</code>)</h3>
<p>When you start a brand new HTML file, you need that standard structure (<code>&lt;html&gt;</code>, <code>&lt;head&gt;</code>, <code>&lt;body&gt;</code>, etc.). It's boring to type.</p>
<ul>
<li><p><strong>You Type:</strong> <code>!</code> (Exclamation mark + Tab)</p>
</li>
<li><p><strong>Emmet Writes:</strong></p>
<p>  HTML</p>
<pre><code class="lang-plaintext">  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;Document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;

  &lt;/body&gt;
  &lt;/html&gt;
</code></pre>
</li>
</ul>
<h3 id="heading-summary">Summary</h3>
<p>Emmet is optional. You <em>can</em> type everything manually if you enjoy finger pain. But if you want to be efficient, learn to speak Emmet.</p>
<ul>
<li><p><strong>Tags:</strong> Just type the name.</p>
</li>
<li><p><strong>Classes:</strong> Use dot <code>.classname</code>.</p>
</li>
<li><p><strong>IDs:</strong> Use hash <code>#idname</code>.</p>
</li>
<li><p><strong>Children:</strong> Use <code>&gt;</code>.</p>
</li>
<li><p><strong>Multiplication:</strong> Use <code>*</code>.</p>
</li>
</ul>
<p>Open your VS Code right now, create a dummy HTML file, and try typing <code>ul&gt;li*5</code>. It feels satisfying every single time.</p>
<p>See you in the next blog of <strong>The Tech Tales</strong>!</p>
]]></content:encoded></item></channel></rss>