nerdexam
CIW

1D0-61B · Question #42

Which line of code instructs the browser to look for a directory named mysite that begins one level higher than the page you are currently viewing?

The correct answer is C. ./mysite/index.html. Option C (./mysite/index.html) is correct because the ./ prefix explicitly tells the browser to start from the current directory - the folder that sits one level above (i.e., contains) the page file you're viewing - and then look for mysite within it. Option A…

HTML5 Coding

Question

Which line of code instructs the browser to look for a directory named mysite that begins one level higher than the page you are currently viewing?

Options

  • Amysite/index.html
  • B/mysite/index.html
  • C./mysite/index.html

How the community answered

(39 responses)
  • A
    8% (3)
  • B
    5% (2)
  • C
    87% (34)

Explanation

Option C (./mysite/index.html) is correct because the ./ prefix explicitly tells the browser to start from the current directory - the folder that sits one level above (i.e., contains) the page file you're viewing - and then look for mysite within it. Option A (mysite/index.html) omits the explicit ./ marker; while browsers often treat it the same way, it doesn't carry the explicit "start from the containing directory" instruction the question describes. Option B (/mysite/index.html) is wrong because a leading / creates an absolute path anchored at the server's root, completely ignoring your current location in the folder hierarchy.

Memory tip: Think of . as "dot = here (this folder)" and a bare / at the start as "slash = root of the whole server." When you see ./, you're explicitly saying "start from the folder I'm currently sitting in."

Topics

#relative paths#path syntax#HTML links#directory references

Community Discussion

No community discussion yet for this question.

Full 1D0-61B Practice