Question:easy

Which of the following is the correct way to apply an external CSS file?

Show Hint

Look for the tag with both a rel and an href attribute.
Updated On: Jul 2, 2026
  • <css href="styles.css">
  • <link rel="stylesheet" href="styles.css">
  • <style src="styles.css">
  • <stylesheet>styles.css</stylesheet>
Show Solution

The Correct Option is B

Solution and Explanation

Linking an external stylesheet is a job for the $\texttt{<link>}$ element placed in the head. It needs two attributes: $\texttt{rel="stylesheet"}$ to declare the relationship and $\texttt{href}$ to point at the file.

That gives $\texttt{<link rel="stylesheet" href="styles.css">}$. The other choices fail because $\texttt{<css>}$ and $\texttt{<stylesheet>}$ are not real tags, and $\texttt{<style>}$ is for embedding rules directly, not for referencing a file with $\texttt{src}$.

\[\boxed{\texttt{<link rel="stylesheet" href="styles.css">}}\]
Was this answer helpful?
0