question: 1\nassume you have two files for your website, and these files exist in the same…

question: 1\nassume you have two files for your website, and these files exist in the same folder:\nabout.html\nstyle.css\nwhich of the following is the proper way to apply the css code inside style.css to the about.html file?\ninside style.css:\napplyto {\n href: about.html;\n}\ninside about.html:\n<head>\n <style href=\style.css\></style>\n</head>\ninside style.css:\n<html href=\about.html\>\ninside about.html:\n<head>\n <link rel=\stylesheet\ type=\text/css\ href=\style.css\>\n</head>

question: 1\nassume you have two files for your website, and these files exist in the same folder:\nabout.html\nstyle.css\nwhich of the following is the proper way to apply the css code inside style.css to the about.html file?\ninside style.css:\napplyto {\n href: about.html;\n}\ninside about.html:\n<head>\n <style href=\style.css\></style>\n</head>\ninside style.css:\n<html href=\about.html\>\ninside about.html:\n<head>\n <link rel=\stylesheet\ type=\text/css\ href=\style.css\>\n</head>

Answer

Brief Explanations:

To apply an external CSS file (style.css) to an HTML file (about.html), in the HTML file's <head> section, a <link> tag with rel="stylesheet", type="text/css" and href pointing to the CSS file is used. The first option is incorrect as it's not a valid way to apply CSS. The second option uses <style> tag wrong for external CSS. The third option is incorrect as CSS doesn't use <html> tag like that for linking to HTML.

Answer:

D. Inside about.html:

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