Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a link to example.com.
HTML
<a href="[1]">Visit Example</a>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out 'https://' causes the link to break.
Using just 'example' is not a valid URL.
✗ Incorrect
The href attribute needs a full URL starting with https:// to link correctly.
2fill in blank
mediumComplete the code to open the link in a new browser tab.
HTML
<a href="https://example.com" [1]>Open in new tab</a>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
target="_self" opens in the same tab.Putting
href="_blank" is invalid.✗ Incorrect
Using target="_blank" makes the link open in a new tab.
3fill in blank
hardFix the error in the anchor tag to make the link valid.
HTML
<a [1]>Click here</a> Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
link or src instead of href.Not putting quotes around the URL.
✗ Incorrect
The correct attribute for links is href with quotes around the URL.
4fill in blank
hardFill both blanks to create a link that opens in a new tab and is safe for security.
HTML
<a href="https://example.com" [1] [2]>Secure Link</a>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting
rel="noopener" when using target="_blank".Using
target="_self" which opens in the same tab.✗ Incorrect
Use target="_blank" to open in a new tab and rel="noopener" to improve security.
5fill in blank
hardFill all three blanks to create a link with text, URL, and open it safely in a new tab.
HTML
<a href="[1]" [2] [3]>Visit Site</a>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out
rel="noopener" causes security risks.Using
rel="nofollow" instead of rel="noopener" for this purpose.✗ Incorrect
The link URL is https://openai.com. Use target="_blank" to open in a new tab and rel="noopener" for security.