0
0
SEO Fundamentalsknowledge~10 mins

Hreflang for international SEO - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the language of the page using hreflang.

SEO Fundamentals
<link rel="alternate" hreflang="[1]" href="https://example.com/en/" />
Drag options to blanks, or click blank then click option'
Ade
Bfr
Cen
Des
Attempts:
3 left
💡 Hint
Common Mistakes
Using a country code instead of a language code.
Leaving the hreflang attribute empty.
2fill in blank
medium

Complete the code to specify the language and region using hreflang.

SEO Fundamentals
<link rel="alternate" hreflang="[1]" href="https://example.com/en-us/" />
Drag options to blanks, or click blank then click option'
Aen-GB
Bes-MX
Cfr-CA
Den-US
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up region codes.
Using only the language code when region is needed.
3fill in blank
hard

Fix the error in the hreflang attribute to correctly specify French for Canada.

SEO Fundamentals
<link rel="alternate" hreflang="[1]" href="https://example.com/fr-ca/" />
Drag options to blanks, or click blank then click option'
Afr-CA
Bfr-ca
CFR-CA
Dfr_ca
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase for region code.
Using underscore instead of hyphen.
Using uppercase for language code.
4fill in blank
hard

Fill both blanks to create hreflang links for English (US) and Spanish (Mexico).

SEO Fundamentals
<link rel="alternate" hreflang="[1]" href="https://example.com/en-us/" />
<link rel="alternate" hreflang="[2]" href="https://example.com/es-mx/" />
Drag options to blanks, or click blank then click option'
Aen-US
Bes-MX
Cen-GB
Dfr-FR
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping language and region codes.
Using lowercase for region codes.
5fill in blank
hard

Fill all three blanks to create a dictionary mapping languages to URLs for hreflang tags.

SEO Fundamentals
hreflang_links = {
  "[1]": "https://example.com/en/",
  "[2]": "https://example.com/fr/",
  "[3]": "https://example.com/es/"
}
Drag options to blanks, or click blank then click option'
Aen
Bfr
Ces
Dde
Attempts:
3 left
💡 Hint
Common Mistakes
Using country codes instead of language codes.
Mixing up language codes.