187k views
1 vote
Assume you have two files for your website, and these files exist in the same folder:

home.html
style.css
Which of the following is the proper way to apply the CSS code inside style.css to the home.html file?
Inside home.html:



Inside home.html:



Inside style.css:

Inside style.css:
applyTo {
href: home.html; }

User Sanlok Lee
by
8.3k points

1 Answer

5 votes

Answer:

<!DOCTYPE html>

<html>

<head>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

<!-- Your HTML code here -->

</body>

</html>

Step-by-step explanation:

This method links the HTML file to the CSS file using the link element in the head section of the HTML file. The href attribute specifies the path to the CSS file, which in this case is style.css. The CSS code is then written inside the style.css file.

User Ben Harold
by
8.3k points