Question:

What is the correct way to refer to an external CSS file?

Show Hint

Always place the `<link>` tag for external stylesheets inside the `<head>` section of your HTML document. This ensures that the styles are loaded before the browser starts rendering the body content.
Updated On: Jul 2, 2026
  • <link style src="styles.css">
  • <css>styles.css</css>
  • <link rel="stylesheet" href="styles.css">
  • <stylesheet>styles.css</stylesheet>
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

There are three ways to apply CSS to an HTML document: inline, internal, and external. To link an external CSS file, you must use the HTML `<link>` tag inside the `<head>` section of the HTML document.
The `<link>` tag defines the relationship between the current document and an external resource.
The correct syntax requires three key attributes:
`rel="stylesheet"`: This attribute is required and specifies the relationship. It tells the browser that the linked document is a stylesheet. `href="styles.css"`: This attribute specifies the URL or path to the external CSS file. (Optionally) `type="text/css"`: This attribute specifies the media type of the linked document, but it is no longer required in HTML5.
Let's analyze the options:
(A) `<link style src="styles.css">`: Incorrect. The attributes are `rel` and `href`, not `style` and `src`. (B) `<css>styles.css</css>`: Incorrect. There is no `<css>` tag in HTML. (C) `<link rel="stylesheet" href="styles.css">`: This is the correct syntax. (D) `<stylesheet>styles.css</stylesheet>`: Incorrect. There is no `<stylesheet>` tag in HTML.
Was this answer helpful?
0
0