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

  1. mainstyle.css


Correct Option: A
Explanation:

The correct HTML for referring to an external style sheet is:

A.

Explanation:

Option A is the correct answer. The `tag is used to link an external resource in HTML. In this case, it is used to link an external style sheet. Therelattribute specifies the relationship between the current document and the linked resource, and in this case, it is set to "stylesheet". Thetypeattribute specifies the MIME type of the linked resource, and in this case, it is set to "text/css", indicating that it is a CSS file. Thehref` attribute specifies the path to the external style sheet file, in this case, "mainstyle.css".

Option B is incorrect because the `` tag is used to define an embedded style sheet within the HTML document itself, not to link an external style sheet.

Option C is incorrect because there is no <stylesheet> tag in HTML. The correct tag to define a style sheet is <link>.

Option D is incorrect because the url attribute does not exist for the <link> tag. The correct attribute for specifying the URL of the linked resource is href.

Therefore, the correct answer is A. <link rel="stylesheet" type="text/css" href="mainstyle.css">

Find more quizzes: