Purpose of ./ before call to a stylesheet?

37 views Asked by At

I saw the below head section in a page and I don't understand the purpose of the ./ before the stylesheet call. I checked the directory for the site and the stylesheet is in the same directory as the index page.

<head>
    <meta charset="utf-8">
    <title>Site Title</title>
    <link rel="stylesheet" type="text/css" href="./styles.css">
</head>
1

There are 1 answers

0
Matthew On BEST ANSWER

. refers to the current directory (that the HTML page is in) and ./styles.css refers to a file called styles.css in the current directory. See here for more info https://stackoverflow.com/a/24340516/8595398