Complete the code to specify the language of the page using hreflang.
<link rel="alternate" hreflang="[1]" href="https://example.com/en/" />
The hreflang attribute specifies the language of the linked page. Here, "en" stands for English.
Complete the code to specify the language and region using hreflang.
<link rel="alternate" hreflang="[1]" href="https://example.com/en-us/" />
The hreflang attribute can specify both language and region. "en-US" means English for the United States.
Fix the error in the hreflang attribute to correctly specify French for Canada.
<link rel="alternate" hreflang="[1]" href="https://example.com/fr-ca/" />
The correct format for hreflang uses lowercase language code and uppercase region code separated by a hyphen, like "fr-CA" for French in Canada.
Fill both blanks to create hreflang links for English (US) and Spanish (Mexico).
<link rel="alternate" hreflang="[1]" href="https://example.com/en-us/" /> <link rel="alternate" hreflang="[2]" href="https://example.com/es-mx/" />
"en-US" specifies English for the United States, and "es-MX" specifies Spanish for Mexico in hreflang attributes.
Fill all three blanks to create a dictionary mapping languages to URLs for hreflang tags.
hreflang_links = {
"[1]": "https://example.com/en/",
"[2]": "https://example.com/fr/",
"[3]": "https://example.com/es/"
}This dictionary maps language codes to their respective URLs for hreflang usage: English (en), French (fr), and Spanish (es).