Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 6.7 — SEO Basics for Developers
HTML · Example 2 of 2

Which links can a crawler follow?

Crawlers collect <a href> URLs; they don't click elements or run onclick handlers. Link text tells them what the target page is about.

Search engines crawl, render and index pages before they rank them; developers control that with robots rules, canonical URLs, sitemaps, clean URLs, semantic HTML and hreflang for other languages.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 6 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Write a robots.txt for a shop that blocks /cart/ and /checkout/ for every crawler and points to its sitemap at https://bagbazaar.example/sitemap.xml.

02

Write the head tags for the French version of https://bagbazaar.example/fr/sacs on a site with English (/en/bags) and French pages, with English as the fallback.

03

Write a JavaScript snippet that logs every <a> on the page that has no href.

Explain it without notes

01

Describe crawling, rendering and indexing, and what can stop each one.

02

What's the difference between robots.txt and <meta name="robots" content="noindex">?

03

What is a canonical URL and when do you need one?

04

How does hreflang work, and what are its common mistakes?

05

Why is semantic HTML part of SEO?

Which links can a crawler follow?

Preview

Press Run to see the page.

Console

Nothing logged yet.

Expected console output

Egg-free pancakes: crawlable
Crispy dosa: crawlable
Quick upma: NOT crawlable
Coming soon: NOT crawlable
Click here: crawlable (vague text)
h1 count: 1