0
0
Svelteframework~15 mins

SEO and meta tags in Svelte - Deep Dive

Choose your learning style9 modes available
Overview - SEO and meta tags
What is it?
SEO stands for Search Engine Optimization, which helps websites show up better in search results. Meta tags are special pieces of information in a webpage's code that tell search engines and browsers about the page. They include things like the page title, description, and keywords. Together, SEO and meta tags help people find your website more easily.
Why it matters
Without SEO and meta tags, your website might be invisible to people searching online, no matter how good your content is. This means fewer visitors, less impact, and missed opportunities. Good SEO and meta tags make your site easier to find, improving traffic and success.
Where it fits
Before learning SEO and meta tags, you should understand basic HTML and how webpages work. After this, you can learn about advanced SEO strategies, content marketing, and analytics to track your site's performance.
Mental Model
Core Idea
Meta tags are like labels on a package that tell search engines what your webpage is about, helping them decide how to show it in search results.
Think of it like...
Imagine sending a letter in an envelope with a clear label showing the recipient's name and address. Meta tags are like that label, guiding the postal service (search engines) to deliver your message to the right place.
┌───────────────┐
│   Webpage     │
│  Content +    │
│  Meta Tags    │
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ Search Engine │
│ Reads Meta    │
│ Tags & Index  │
└──────┬────────┘
       │
       ▼
┌───────────────┐
│ Search Result │
│  Ranking &    │
│  Display      │
└───────────────┘
Build-Up - 6 Steps
1
FoundationWhat Are Meta Tags?
🤔
Concept: Meta tags are pieces of code in the webpage's head that provide information about the page.
Meta tags live inside the section of your HTML. They include tags like , <meta name="description">, and <meta charset="UTF-8">. These tags don't show on the page but tell browsers and search engines important details.</div><div class="dlm-step-result "><div class="dlm-result-label">Result</div><div>You learn where meta tags go and what basic tags look like in code.</div></div><div class="dlm-step-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span class="dlm-insight-text">Understanding that meta tags are hidden helpers clarifies how webpages communicate with search engines without changing visible content.</span></div></div></div><div class="dlm-buildup-step " style="--step-color:#3b82f6;--step-bg:#eff6ff"><div class="dlm-step-header"><div class="dlm-step-number">2</div><div class="dlm-step-meta"><span class="dlm-level-badge" style="background:#2563eb">Foundation</span><span class="dlm-step-title">How SEO Uses Meta Tags</span></div><svg class="dlm-step-chevron " viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></div><div class="dlm-step-body d-none"><div class="dlm-self-check d-none"><span class="dlm-self-check-icon">🤔</span><span></span></div><div class="dlm-step-concept"><strong>Concept:</strong> <span>Search engines read meta tags to understand and rank your webpage in search results.</span></div><div class="dlm-step-content">Search engines scan meta tags like the title and description to decide what your page is about. A clear title and description help your page appear in relevant searches and attract clicks.</div><div class="dlm-step-result "><div class="dlm-result-label">Result</div><div>You see how meta tags influence search engine listings and user clicks.</div></div><div class="dlm-step-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span class="dlm-insight-text">Knowing that meta tags shape search snippets helps you realize their power in attracting visitors.</span></div></div></div><div class="dlm-buildup-step " style="--step-color:#eab308;--step-bg:#fefce8"><div class="dlm-step-header"><div class="dlm-step-number">3</div><div class="dlm-step-meta"><span class="dlm-level-badge" style="background:#ca8a04">Intermediate</span><span class="dlm-step-title">Adding Meta Tags in Svelte</span></div><svg class="dlm-step-chevron " viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></div><div class="dlm-step-body d-none"><div class="dlm-self-check "><span class="dlm-self-check-icon">🤔</span><span>Before reading on: Do you think meta tags in Svelte are added inside components or only in static HTML? Commit to your answer.</span></div><div class="dlm-step-concept"><strong>Concept:</strong> <span>Svelte allows adding meta tags dynamically inside components using the <svelte:head> element.</span></div><div class="dlm-step-content">In Svelte, you use <svelte:head> inside your component to add or change meta tags. For example: <svelte:head> <title>My Page Title This updates the page's head when the component loads.
Result
Meta tags appear in the page head and update dynamically with the component.
Understanding lets you control SEO tags per page or component, making your app SEO-friendly and dynamic.
4
IntermediateCommon Meta Tags for SEO
🤔Before reading on: Which meta tag do you think is most important for SEO: keywords, description, or charset? Commit to your answer.
Concept: Certain meta tags like title, description, and viewport are essential for SEO and user experience.
Important meta tags include: - : The page title shown in search results and browser tabs. - <meta name="description">: A short summary shown in search snippets. - <meta name="viewport">: Controls layout on mobile devices. - <meta charset="UTF-8">: Sets character encoding. Keywords meta tag is mostly ignored by modern search engines.</div><div class="dlm-step-result "><div class="dlm-result-label">Result</div><div>You know which meta tags to prioritize for SEO and usability.</div></div><div class="dlm-step-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span class="dlm-insight-text">Focusing on the right meta tags avoids wasted effort and improves both search ranking and user experience.</span></div></div></div><div class="dlm-buildup-step " style="--step-color:#ef4444;--step-bg:#fef2f2"><div class="dlm-step-header"><div class="dlm-step-number">5</div><div class="dlm-step-meta"><span class="dlm-level-badge" style="background:#dc2626">Advanced</span><span class="dlm-step-title">Dynamic Meta Tags for SPA SEO</span></div><svg class="dlm-step-chevron " viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></div><div class="dlm-step-body d-none"><div class="dlm-self-check "><span class="dlm-self-check-icon">🤔</span><span>Before reading on: Do you think single-page apps need special handling for meta tags to rank well? Commit to your answer.</span></div><div class="dlm-step-concept"><strong>Concept:</strong> <span>Single-page applications (SPAs) like those built with Svelte need dynamic meta tags and sometimes server-side rendering for good SEO.</span></div><div class="dlm-step-content">SPAs load content dynamically, so search engines might see only a blank page without meta tags. Using <svelte:head> updates meta tags on navigation, but for best SEO, server-side rendering (SSR) or prerendering is recommended. This ensures search engines get full meta info immediately.</div><div class="dlm-step-result "><div class="dlm-result-label">Result</div><div>You understand how to handle meta tags in dynamic apps to improve SEO.</div></div><div class="dlm-step-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span class="dlm-insight-text">Knowing SPA SEO challenges helps you choose the right rendering strategy to make your site visible to search engines.</span></div></div></div><div class="dlm-buildup-step " style="--step-color:#8b5cf6;--step-bg:#f5f3ff"><div class="dlm-step-header"><div class="dlm-step-number">6</div><div class="dlm-step-meta"><span class="dlm-level-badge" style="background:#7c3aed">Expert</span><span class="dlm-step-title">Meta Tags and Social Sharing Optimization</span></div><svg class="dlm-step-chevron " viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></div><div class="dlm-step-body d-none"><div class="dlm-self-check "><span class="dlm-self-check-icon">🤔</span><span>Before reading on: Do you think meta tags affect only search engines or also social media previews? Commit to your answer.</span></div><div class="dlm-step-concept"><strong>Concept:</strong> <span>Meta tags also control how your page looks when shared on social media using Open Graph and Twitter Card tags.</span></div><div class="dlm-step-content">Adding tags like <meta property="og:title"> and <meta name="twitter:card"> helps social platforms show rich previews with images and descriptions. This improves click rates when users share your page. In Svelte, you add these inside <svelte:head> just like other meta tags.</div><div class="dlm-step-result "><div class="dlm-result-label">Result</div><div>Your pages have attractive previews on social media, increasing engagement.</div></div><div class="dlm-step-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span class="dlm-insight-text">Understanding meta tags beyond SEO unlocks better marketing and user reach through social sharing.</span></div></div></div></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon tips"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#F59E0B"><path d="M580-80q-25 0-42.5-17.5T520-140v-200q0-18 9-32t24-22l20 39q4 7 10 11t14 4q15 0 23-12.5t1-26.5l-11-21h60l23 45q4 7 10 11t14 4q15 0 23-12.5t1-26.5l-11-21h60l23 45q4 7 10 11t14 4q15 0 23-12.5t1-26.5l-11-21h10q25 0 42.5 17.5T920-340v200q0 25-17.5 42.5T860-80H580Zm0-60h280v-140H580v140Zm12-343q-15 8-31 2.5T537-501q-8-17-22.5-28T482-540q-25 0-42.5 17T422-481q0 18 9.5 32.5T458-426q15 8 21 23.5t-2 30.5q-8 15-23.5 21t-30.5-2q-38-17-59.5-51T342-480q0-58 41-99t99-41q42 0 76.5 22t51.5 60q8 15 2.5 31T592-483ZM411-80q-17 0-30-11t-15-28l-12-89q-13-5-24.5-12T307-235l-62 26q-25 11-50 2t-39-32l-47-82q-14-23-8-49t27-43l53-40q-1-7-1-13.5v-27q0-6.5 1-13.5l-53-40q-21-17-27-43t8-49l47-82q14-23 39-32t50 2l62 26q11-8 23-15t24-12l8-66q3-27 23-44.5t47-17.5h96q27 0 47 17.5t23 44.5l8 66q13 5 24.5 12t22.5 15l60-26q25-11 50.5-2t39.5 32l47 82q14 23 8.5 49T832-547l-46 35q-14 10-30 8t-26-16q-10-14-7.5-30t15.5-26l39-30-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q24 25 54 42t65 22v150q0 14-8 24t-21 10Zm70-401Zm0 0Z"></path></svg></span></span><span class="codefly-card-title">Under the Hood</span></div><div class="code-articles-card-body"><div class="dlm-mechanism-text">Browsers and search engines parse the HTML document starting from the <head> section. Meta tags provide metadata that does not display on the page but informs these tools about the page's content, language, encoding, and how to display it. Search engines use this metadata to index pages correctly and generate search snippets. Social platforms read special meta tags to create rich link previews. In SPAs, meta tags can be updated dynamically via JavaScript, but search engines may require server-rendered HTML to see them initially.</div><div class="dlm-design-reason "><div class="dlm-design-reason-label">Why designed this way?</div><div>Meta tags were created to separate content from metadata, allowing browsers and search engines to understand pages without showing extra text to users. This design keeps pages clean and accessible while enabling powerful indexing and display features. The dynamic update capability in frameworks like Svelte supports modern web apps that change content without full page reloads, balancing interactivity with SEO needs.</div></div><div class="dlm-ascii-visual mechanism-diagram "><pre>┌───────────────┐ │ HTML Document│ │ <head> │ │ ┌───────────┐│ │ │Meta Tags ││ │ └───────────┘│ └──────┬────────┘ │ ▼ ┌───────────────┐ │ Browser/ │ │ Search Engine │ │ Parser │ └──────┬────────┘ │ ▼ ┌───────────────┐ │ Indexing & │ │ Display Logic │ └───────────────┘</pre></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon project"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="M193.33-80q-30.25 0-51.79-21.54T120-153.33v-173.34q0-30.25 21.54-51.79T193.33-400h573.34q30.25 0 51.79 21.54T840-326.67v173.34q0 30.25-21.54 51.79T766.67-80H193.33Zm-6.66-66.67h586.66v-186.66H186.67v186.66Zm252-558.66 86-153.34q4.33-7.66 11.33-11 7-3.33 14.67-1.33 7.66 2 13.3 6.5 5.63 4.5 7.36 13.5L600-677.33 768-724q9-2.33 16.17.67 7.16 3 11.5 9 4.33 6 4.66 13.33.34 7.33-5 15L694-541.33l43 25q12 7.33 15.17 20.66 3.16 13.34-4.17 25.34t-21 15.16q-13.67 3.17-25.67-4.16l-71.33-44q-12.67-7.67-15.33-21.5-2.67-13.84 5.66-25.84l51-75.33-124.66 29-22-123.33-65.34 113-106.66-77.34L387-557.33l-129.33 22.66L288-516.33q12 6.66 15.5 19.66t-3.17 25q-6.66 12-20 15.5-13.33 3.5-25.33-3.16l-132.67-76q-7.66-4.34-10.83-11.34t-1.17-14.66q2-7.67 6.84-12.84 4.83-5.16 13.83-7.16l172.33-29.34-46-170q-2.33-9 .34-15.83 2.66-6.83 8.66-11.17 6-4.33 13.67-4.66 7.67-.34 15.33 5l143.34 102Zm41 246ZM480-240Z"></path></svg></span></span><span class="codefly-card-title">Myth Busters - <!-- -->4<!-- --> Common Misconceptions</span></div><div class="code-articles-card-body"><div class="dlm-myths-grid"><div class="dlm-myth-card "><div class="dlm-myth-front "><div class="dlm-myth-self-check">Quick: Do you think the keywords meta tag still helps your page rank higher? Commit to yes or no.</div><div class="dlm-myth-belief"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Common Belief:</span><span>The keywords meta tag is essential for SEO and helps your page rank better.</span></div><div class="dlm-myth-tap">Tap to reveal reality <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="yellow-icon-color ms-1 mb-1" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.75v2.716l.047-.002c.312-.012.742-.016 1.051.046.28.056.543.18.738.288.273.152.456.385.56.642l.132-.012c.312-.024.794-.038 1.158.108.37.148.689.487.88.716q.113.137.195.248h.582a2 2 0 0 1 1.99 2.199l-.272 2.715a3.5 3.5 0 0 1-.444 1.389l-1.395 2.441A1.5 1.5 0 0 1 12.42 16H6.118a1.5 1.5 0 0 1-1.342-.83l-1.215-2.43L1.07 8.589a1.517 1.517 0 0 1 2.373-1.852L5 8.293V1.75a1.75 1.75 0 0 1 3.5 0"></path></svg></div></div><div class="dlm-myth-back d-none"><div class="dlm-myth-reality"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Reality:</span><span>Modern search engines ignore the keywords meta tag because it was often abused with spammy keywords.</span></div><div class="dlm-myth-why"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="M459-60q-10-3.33-19-10L186.67-260q-12.34-9-19.5-23.33-7.17-14.34-7.17-30v-500q0-27 19.83-46.84Q199.67-880 226.67-880h506.66q27 0 46.84 19.83Q800-840.33 800-813.33v500q0 15.66-7.17 30-7.16 14.33-19.5 23.33L520-70q-9 6.67-19 10t-21 3.33q-11 0-21-3.33Zm-21.67-394-70.66-70.67q-10-10-23.34-9.83-13.33.17-23.33 9.83-10 10-10.17 23.5-.16 13.5 9.84 23.5l95 94.34q10 10 23.33 10 13.33 0 23.33-10l179.34-179.34q10-10 9.5-23.33-.5-13.33-10.17-23.33-10-10-23.5-10.17-13.5-.17-23.5 9.83L437.33-454Z"></path></svg></span>Why it matters:</span><span>Relying on keywords meta tag wastes effort and can distract from more important SEO practices like quality content and proper titles.</span></div></div></div><div class="dlm-myth-card "><div class="dlm-myth-front "><div class="dlm-myth-self-check">Quick: Do you think adding many meta tags with repeated keywords improves SEO? Commit to yes or no.</div><div class="dlm-myth-belief"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Common Belief:</span><span>More meta tags with repeated keywords make your page rank higher.</span></div><div class="dlm-myth-tap">Tap to reveal reality <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="yellow-icon-color ms-1 mb-1" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.75v2.716l.047-.002c.312-.012.742-.016 1.051.046.28.056.543.18.738.288.273.152.456.385.56.642l.132-.012c.312-.024.794-.038 1.158.108.37.148.689.487.88.716q.113.137.195.248h.582a2 2 0 0 1 1.99 2.199l-.272 2.715a3.5 3.5 0 0 1-.444 1.389l-1.395 2.441A1.5 1.5 0 0 1 12.42 16H6.118a1.5 1.5 0 0 1-1.342-.83l-1.215-2.43L1.07 8.589a1.517 1.517 0 0 1 2.373-1.852L5 8.293V1.75a1.75 1.75 0 0 1 3.5 0"></path></svg></div></div><div class="dlm-myth-back d-none"><div class="dlm-myth-reality"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Reality:</span><span>Search engines penalize keyword stuffing and prefer clear, concise meta tags that accurately describe the page.</span></div><div class="dlm-myth-why"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="M459-60q-10-3.33-19-10L186.67-260q-12.34-9-19.5-23.33-7.17-14.34-7.17-30v-500q0-27 19.83-46.84Q199.67-880 226.67-880h506.66q27 0 46.84 19.83Q800-840.33 800-813.33v500q0 15.66-7.17 30-7.16 14.33-19.5 23.33L520-70q-9 6.67-19 10t-21 3.33q-11 0-21-3.33Zm-21.67-394-70.66-70.67q-10-10-23.34-9.83-13.33.17-23.33 9.83-10 10-10.17 23.5-.16 13.5 9.84 23.5l95 94.34q10 10 23.33 10 13.33 0 23.33-10l179.34-179.34q10-10 9.5-23.33-.5-13.33-10.17-23.33-10-10-23.5-10.17-13.5-.17-23.5 9.83L437.33-454Z"></path></svg></span>Why it matters:</span><span>Overloading meta tags can hurt your ranking and make your site look spammy to both users and search engines.</span></div></div></div><div class="dlm-myth-card "><div class="dlm-myth-front "><div class="dlm-myth-self-check">Quick: Do you think SPAs automatically have good SEO because they have meta tags in JavaScript? Commit to yes or no.</div><div class="dlm-myth-belief"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Common Belief:</span><span>Single-page apps with meta tags in JavaScript are fully SEO-friendly by default.</span></div><div class="dlm-myth-tap">Tap to reveal reality <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="yellow-icon-color ms-1 mb-1" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.75v2.716l.047-.002c.312-.012.742-.016 1.051.046.28.056.543.18.738.288.273.152.456.385.56.642l.132-.012c.312-.024.794-.038 1.158.108.37.148.689.487.88.716q.113.137.195.248h.582a2 2 0 0 1 1.99 2.199l-.272 2.715a3.5 3.5 0 0 1-.444 1.389l-1.395 2.441A1.5 1.5 0 0 1 12.42 16H6.118a1.5 1.5 0 0 1-1.342-.83l-1.215-2.43L1.07 8.589a1.517 1.517 0 0 1 2.373-1.852L5 8.293V1.75a1.75 1.75 0 0 1 3.5 0"></path></svg></div></div><div class="dlm-myth-back d-none"><div class="dlm-myth-reality"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Reality:</span><span>Search engines may not see dynamically added meta tags unless the app uses server-side rendering or prerendering.</span></div><div class="dlm-myth-why"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="M459-60q-10-3.33-19-10L186.67-260q-12.34-9-19.5-23.33-7.17-14.34-7.17-30v-500q0-27 19.83-46.84Q199.67-880 226.67-880h506.66q27 0 46.84 19.83Q800-840.33 800-813.33v500q0 15.66-7.17 30-7.16 14.33-19.5 23.33L520-70q-9 6.67-19 10t-21 3.33q-11 0-21-3.33Zm-21.67-394-70.66-70.67q-10-10-23.34-9.83-13.33.17-23.33 9.83-10 10-10.17 23.5-.16 13.5 9.84 23.5l95 94.34q10 10 23.33 10 13.33 0 23.33-10l179.34-179.34q10-10 9.5-23.33-.5-13.33-10.17-23.33-10-10-23.5-10.17-13.5-.17-23.5 9.83L437.33-454Z"></path></svg></span>Why it matters:</span><span>Ignoring this can cause your SPA to rank poorly because search engines see incomplete or empty metadata.</span></div></div></div><div class="dlm-myth-card "><div class="dlm-myth-front "><div class="dlm-myth-self-check">Quick: Do you think meta tags only affect search engines and not social media? Commit to yes or no.</div><div class="dlm-myth-belief"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Common Belief:</span><span>Meta tags only matter for search engines and have no effect on social media sharing.</span></div><div class="dlm-myth-tap">Tap to reveal reality <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="yellow-icon-color ms-1 mb-1" height="18" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 1.75v2.716l.047-.002c.312-.012.742-.016 1.051.046.28.056.543.18.738.288.273.152.456.385.56.642l.132-.012c.312-.024.794-.038 1.158.108.37.148.689.487.88.716q.113.137.195.248h.582a2 2 0 0 1 1.99 2.199l-.272 2.715a3.5 3.5 0 0 1-.444 1.389l-1.395 2.441A1.5 1.5 0 0 1 12.42 16H6.118a1.5 1.5 0 0 1-1.342-.83l-1.215-2.43L1.07 8.589a1.517 1.517 0 0 1 2.373-1.852L5 8.293V1.75a1.75 1.75 0 0 1 3.5 0"></path></svg></div></div><div class="dlm-myth-back d-none"><div class="dlm-myth-reality"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Reality:</span><span>Special meta tags like Open Graph and Twitter Cards control how your page looks when shared on social media platforms.</span></div><div class="dlm-myth-why"><span class="dlm-myth-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="M459-60q-10-3.33-19-10L186.67-260q-12.34-9-19.5-23.33-7.17-14.34-7.17-30v-500q0-27 19.83-46.84Q199.67-880 226.67-880h506.66q27 0 46.84 19.83Q800-840.33 800-813.33v500q0 15.66-7.17 30-7.16 14.33-19.5 23.33L520-70q-9 6.67-19 10t-21 3.33q-11 0-21-3.33Zm-21.67-394-70.66-70.67q-10-10-23.34-9.83-13.33.17-23.33 9.83-10 10-10.17 23.5-.16 13.5 9.84 23.5l95 94.34q10 10 23.33 10 13.33 0 23.33-10l179.34-179.34q10-10 9.5-23.33-.5-13.33-10.17-23.33-10-10-23.5-10.17-13.5-.17-23.5 9.83L437.33-454Z"></path></svg></span>Why it matters:</span><span>Missing these tags means your shared links may look plain or unattractive, reducing user engagement.</span></div></div></div></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon intro"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#3B82F6"><path d="M853.33-315.33V-562l-342 185q-15.33 8.67-32 8.33-16.66-.33-32-9L93.33-571q-9-5.33-12.83-12.67Q76.67-591 76.67-600q0-9 3.83-16.33 3.83-7.34 12.83-12.67l354-193.33q7.67-4.34 15.5-6.5 7.84-2.17 16.5-2.17 8.67 0 16.5 2.17 7.84 2.16 15.5 6.5l391 212.66q8.67 4.34 13.17 12.5Q920-589 920-580v264.67q0 14.33-9.5 23.83-9.5 9.5-23.83 9.5-14.34 0-23.84-9.5t-9.5-23.83Zm-406 177.66-220-120q-16-9-25.33-24.66-9.33-15.67-9.33-34.34v-166.66l254.66 139q15.34 8.66 32 8.66 16.67 0 32-8.66l254.67-139v166.66q0 18.67-9.33 34.34-9.34 15.66-25.34 24.66l-220 120q-7.66 4.34-15.5 6.5Q488-129 479.33-129q-8.66 0-16.5-2.17-7.83-2.16-15.5-6.5Z"></path></svg></span></span><span class="codefly-card-title">Expert Zone</span></div><div class="code-articles-card-body"><div class="dlm-expert-nuances"><div class="dlm-nuance-item"><div class="dlm-nuance-number">1</div><div class="dlm-nuance-text">Meta tags can be dynamically updated in Svelte components, but timing matters: search engines may only see the initial server-rendered tags.</div></div><div class="dlm-nuance-item"><div class="dlm-nuance-number">2</div><div class="dlm-nuance-text">Open Graph and Twitter Card tags require precise formatting and image sizes to display correctly across platforms.</div></div><div class="dlm-nuance-item"><div class="dlm-nuance-number">3</div><div class="dlm-nuance-text">Using canonical meta tags helps prevent duplicate content issues when multiple URLs show the same page.</div></div></div><div class="dlm-when-not"><div class="dlm-when-not-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>When NOT to use</div><div>Avoid relying solely on meta tags for SEO in large SPAs without server-side rendering; instead, use SSR or prerendering frameworks like SvelteKit. Also, do not overuse meta tags for keyword stuffing; focus on quality content and structured data instead.</div></div><div class="dlm-production"><div class="dlm-production-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Production Patterns</div><div>In production, developers use <svelte:head> in page components to set unique titles and descriptions per route. They combine this with SvelteKit's SSR to ensure search engines get full meta info. Social meta tags are added for marketing. Canonical tags prevent duplicate content penalties. Automated tools check meta tags for SEO compliance during deployment.</div></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon intro"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#3B82F6"><path d="M602.67-120v-123.33h-156V-650H358v126.67H80V-840h278v123.33h244.67V-840H880v316.67H602.67V-650h-89.34v340h89.34v-126.67H880V-120H602.67Zm-456-653.33V-590v-183.33ZM669.33-370v183.33V-370Zm0-403.33V-590v-183.33Zm0 183.33h144v-183.33h-144V-590Zm0 403.33h144V-370h-144v183.33ZM146.67-590h144.66v-183.33H146.67V-590Z"></path></svg></span></span><span class="codefly-card-title">Connections</span></div><div class="code-articles-card-body"><div class="dlm-connections-list"><div class="dlm-connection-item"><div class="dlm-connection-to">Server-Side Rendering (SSR)</div><div class="dlm-connection-rel">Builds-on</div><div class="dlm-connection-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span>Understanding meta tags helps grasp why SSR is crucial for SPAs to deliver SEO-friendly content immediately to search engines.</span></div></div><div class="dlm-connection-item"><div class="dlm-connection-to">Digital Marketing</div><div class="dlm-connection-rel">Builds-on</div><div class="dlm-connection-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span>Knowing how meta tags affect search rankings and social sharing connects web development with marketing strategies to increase site traffic.</span></div></div><div class="dlm-connection-item"><div class="dlm-connection-to">Library Cataloging Systems</div><div class="dlm-connection-rel">Same pattern</div><div class="dlm-connection-insight"><span class="dlm-insight-icon"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="yellow-icon-color" height="22" width="22" xmlns="http://www.w3.org/2000/svg"><path d="M7.94101 18C7.64391 16.7274 6.30412 15.6857 5.75395 14.9992C4.65645 13.6297 4 11.8915 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10C20 11.8925 19.3428 13.6315 18.2443 15.0014C17.6944 15.687 16.3558 16.7276 16.059 18H7.94101ZM16 20V21C16 22.1046 15.1046 23 14 23H10C8.89543 23 8 22.1046 8 21V20H16ZM13 10.0048V6L8.5 12.0048H11V16.0048L15.5 10.0048H13Z"></path></svg></span><span>Meta tags in webpages are like catalog entries in libraries, both organizing and describing content to help users find what they need efficiently.</span></div></div></div></div></article><article class="content-card dlm-card"><div class="code-articles-card-header"><span class="card-icon project"><span class="new-material-symbols icon-hw-24"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-513.33 80.67 80.66Q570.33-423 584-423q13.67 0 23.33-9.67Q617-442.33 617-456q0-13.67-9.67-23.33L526.67-560l80.66-80.67Q617-650.33 617-664q0-13.67-9.67-23.33Q597.67-697 584-697q-13.67 0-23.33 9.67L480-606.67l-80.67-80.66Q389.67-697 376-697q-13.67 0-23.33 9.67Q343-677.67 343-664q0 13.67 9.67 23.33L433.33-560l-80.66 80.67Q343-469.67 343-456q0 13.67 9.67 23.33Q362.33-423 376-423q13.67 0 23.33-9.67L480-513.33ZM240-240 136.67-136.67Q121-121 100.5-129.6 80-138.21 80-160.33v-653q0-27 19.83-46.84Q119.67-880 146.67-880h666.66q27 0 46.84 19.83Q880-840.33 880-813.33v506.66q0 27-19.83 46.84Q840.33-240 813.33-240H240Zm-28.67-66.67h602v-506.66H146.67v575l64.66-68.34Zm-64.66 0v-506.66 506.66Z"></path></svg></span></span><span class="codefly-card-title">Common Pitfalls</span></div><div class="code-articles-card-body"><div class="dlm-pitfalls-list"><div class="dlm-pitfall-item"><div class="dlm-pitfall-header"><span class="dlm-pitfall-number">#<!-- -->1</span><span class="dlm-pitfall-title">Using the keywords meta tag to try to boost SEO.</span></div><div class="dlm-pitfall-body"><div class="dlm-pitfall-wrong"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#EF4444"><path d="m480-433.33 124.67 124.66Q614.33-299 628-299q13.67 0 23.33-9.67Q661-318.33 661-332q0-13.67-9.67-23.33L526.67-480l124.66-124.67Q661-614.33 661-628q0-13.67-9.67-23.33Q641.67-661 628-661q-13.67 0-23.33 9.67L480-526.67 355.33-651.33Q345.67-661 332-661q-13.67 0-23.33 9.67Q299-641.67 299-628q0 13.67 9.67 23.33L433.33-480 308.67-355.33Q299-345.67 299-332q0 13.67 9.67 23.33Q318.33-299 332-299q13.67 0 23.33-9.67L480-433.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Wrong approach:</span><span><meta name="keywords" content="shoes, buy shoes, cheap shoes" /></span></div><div class="dlm-pitfall-right"><span class="dlm-pitfall-label"><span class="new-material-symbols icon-hw-20"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="#10B981"><path d="m422-395.33-94-94q-9.67-9.67-24-9.67t-24.67 10.33q-9.66 9.67-9.66 24 0 14.34 9.66 24l119.34 120q10 10 23.33 10 13.33 0 23.33-10L680-555.33q10.33-10.34 10.33-24.67 0-14.33-10.33-24.67-10.33-9.66-25-9.33-14.67.33-24.33 10L422-395.33ZM480-80q-82.33 0-155.33-31.5-73-31.5-127.34-85.83Q143-251.67 111.5-324.67T80-480q0-83 31.5-156t85.83-127q54.34-54 127.34-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 82.33-31.5 155.33-31.5 73-85.5 127.34Q709-143 636-111.5T480-80Z"></path></svg></span>Correct approach:</span><span><title>Buy Quality Shoes Online
Root cause:Misunderstanding that keywords meta tag is ignored by modern search engines.
#2Adding meta tags only once in a SPA and expecting them to update on navigation.
Wrong approach:Placing meta tags statically in index.html without dynamic updates in Svelte components.
Correct approach:Using inside each page component to update meta tags dynamically.
Root cause:Not realizing SPAs need dynamic meta tag updates for each page view.
#3Omitting social media meta tags and expecting good link previews.
Wrong approach:My Site
Correct approach:
Root cause:Not knowing social platforms require special meta tags for rich previews.
Key Takeaways
Meta tags are hidden labels in your webpage that guide search engines and browsers about your content.
In Svelte, you use to add or update meta tags dynamically per component or page.
Good SEO relies on clear titles and descriptions, not outdated tags like keywords.
Single-page apps need server-side rendering or prerendering to ensure search engines see meta tags properly.
Meta tags also control how your pages look when shared on social media, improving user engagement.