Web Development 201 (WED201c) Practice Test 2026 - Free Web Development Practice Questions and Study Guide

Session length

1 / 20

What is the correct HTML for referring to an external style sheet?

A. <style src="mystyle.css"></style>

B. <link rel="stylesheet" url="mystyle.css">

C. <link rel="stylesheet" href="mystyle.css">

Using `<link rel="stylesheet" href="mystyle.css">` is the correct way to refer to an external style sheet in HTML. The `<link>` element is designed specifically for linking external resources, and when it comes to CSS, the attributes used are crucial.

The `rel` attribute defines the relationship between the current document and the linked resource, and "stylesheet" indicates that the link is to a style sheet. The `href` attribute specifies the location of the external CSS file, which in this case is "mystyle.css". This syntax is standard practice in HTML and ensures that the browser correctly identifies and applies the styles from the specified file to the document.

The other options deviate from this standard syntax. Some incorrectly use `src` instead of `href`, while others misuse the attributes by employing an incorrect attribute (like `url`). The proper use of `href` in conjunction with `rel="stylesheet"` is what accurately establishes the connection to an external style sheet.

Get further explanation with Examzify DeepDiveBeta

D. <link rel="stylesheet" src="mystyle.css">

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy