Which of the following is the correct way to include a CSS file in an HTML…
2025
Which of the following is the correct way to include a CSS file in an HTML document ?
- A.
<link href="style.css" />
- B.
<css href="style.css">
- C.
<style src="style.css">
- D.
<link rel="stylesheet" href="style.css">
Attempted by 89 students.
Show answer & explanation
Correct answer: D
The correct way to include a CSS file in an HTML document is by using the <link> element within the <head> section. This element specifies the relationship between the HTML document and an external stylesheet using rel="stylesheet".