<link> Tag — HTML Technical Interview Questions & Answers
Links an external resource, most often a stylesheet.
<link> Tag
- Links an external resource, most often a stylesheet.
- <link> is the <link> HTML element. HTML uses this tag so the browser (and screen readers) know what the piece is, not only how it looks.
- Board: <link>…</link> Put it in body. Check it in the browser. Attributes go on the opening tag.
- Trap: wrong nesting or missing a required attribute. CSS can still style it — don’t pick a tag only because of default italics.
- Interview: name the tag, one attribute if it has a famous one (href, src, alt, for, type), one mistake.
Technical Interview Tip: <link>: the <link> HTML element. Example: <link>…</link>
Code Examples for <link> Tag
<link> Tag — working example
<a href="https://gocareergo.com" target="_blank" rel="noopener noreferrer">
GoCareerGo
</a>
<a href="/preparation/information-technology/html">HTML prep (relative)</a>
<a href="mailto:hello@example.com">Email us</a><link> Tag — href sets destination; target=_blank needs rel=noopener; relative paths stay on-site.
How to Explain <link> Tag to an Interviewer
What is the <link> tag?
the <link> HTML element <link>…</link>
One common mistake?
wrong nesting or missing a required attribute