Blog Desk       February 10, 2020      333

Where in an HTML document is the correct place to refer to an external style sheet?

  1. At the end of the document
  2. In the <body> section
  3. In the <head> section
  4. none of them

The Right Answer is : Option C

Explanation

What is External Style Sheet?

An external style sheet is a separate file linked to an HTML page. It comes with a .css filename extension (like: mystyle.css). All the styles that need to be used on a website can be declared in the external style sheet. External style sheets are an important file from the designer's perspective.

Linked HTML Example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    <title>Document</title>
</head>
<body>