Question:

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
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: An external CSS file is attached using the <link> element inside the document head.

Step 2: The correct form is <link rel="stylesheet" href="styles.css">. The rel attribute states the relationship is a stylesheet and href gives the file path.

Step 3: There is no <css> tag, the <style> tag holds inline rules and has no src, and <stylesheet> is not valid HTML.

Step 4: So option B is correct.
Was this answer helpful?
0
0