C. Incorrect target value; should be "_blank" with underscore.
D. The <a> tag is not closed properly.
Solution
Step 1: Check the target attribute value
The value is "blank" but it must be "_blank" with an underscore to open in a new tab.
Step 2: Confirm other attributes
While adding rel="noopener noreferrer" is recommended for security, the main error preventing new tab opening is the wrong target value.
Final Answer:
Incorrect target value; should be "_blank" with underscore. -> Option C
Quick Check:
target must be "_blank" with underscore [OK]
Hint: target="_blank" needs underscore, not just "blank" [OK]
Common Mistakes:
Using target="blank" without underscore
Forgetting rel attribute for security
Assuming missing protocol breaks new tab
5. You want to create a navigation menu where all external links open in new tabs securely, but internal links open in the same tab. Which HTML snippet correctly applies this?
hard
A. <a href="/about" target="_blank">About</a> <a href="https://external.com" target="_blank">External</a>
B. <a href="/about">About</a> <a href="https://external.com" target="_blank" rel="noopener noreferrer">External</a>
C. <a href="/about" target="_blank" rel="noopener noreferrer">About</a> <a href="https://external.com">External</a>
D. <a href="/about" rel="noopener noreferrer">About</a> <a href="https://external.com" target="blank" rel="noopener">External</a>
Solution
Step 1: Identify internal vs external link behavior
Internal links (like "/about") should open in the same tab, so no target attribute is needed.
Step 2: Apply new tab and security attributes to external links
External links should use target="_blank" and rel="noopener noreferrer" for security and to open in new tabs.
Final Answer:
<a href="/about">About</a> <a href="https://external.com" target="_blank" rel="noopener noreferrer">External</a> -> Option B
Quick Check:
Internal same tab, external new tab + security [OK]
Hint: Use target and rel only on external links [OK]
Common Mistakes:
Adding target="_blank" to internal links unnecessarily
Using target="blank" without underscore
Omitting rel attribute on external links
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.