Tricky question Html+Css+Javascript in a selection process

I applied for a job and I received an email with a link with some questions as the first step of the selection process, and I don´t know how to answer it:

  • a) In the head tag
  • b) Bottom of the document
  • Both a) and b) are correct

I think CSS should go in the head tag, and Javascript in the Bottom. However there is no correct answer apparently. I think C should be the good one but its not totally correct, since CSS should only go in the head.

the JavaScript file can both be linked in head and at the end of the body, there are differences in how so you may want to look that up

you may also want to try to make some research yourself before asking for help. be honest in what you know and what you can find out for yourself

I did some research, looked Stackoverflow but I honestly don´t know how to answer this question. As I said, since CSS should go in the head, but Javascript *USUALLY goes at the bottom, I don´t know what to choose.

It seems like you know what you want to answer so why not just do that? Pretend it’s an exam, in a locked room and you can’t get help, and just pick what you think is correct.

Getting an answer correct because someone told you the answer is no better than failing the answer.

It’s both isn’t it? I feel like it’s both.


Well, thanks a lot then. I don´t even know why you are in a forum of a web that is built literally to help you get a job LMAO

Jesus with the morality nowdays…

so if u r creating your CSS and Jscript in separate files from your HTML then it will be a link in the head. same as linking google fonts a so fourth. hope im steering in right direction. new to all this

and if you were writing your CSS on your HTML it would be style tags above the head

What if I give you the wrong answer, how would you know?

MDN: <link>

Permitted parents Any element that accepts metadata elements. If itemprop is present: any element that accepts phrasing content.

MDN: <script>

Permitted parents Any element that accepts metadata content, or any element that accepts phrasing content.

Also, I’m pretty sure if you read my reply again you might get a feel for what I would answer and would suggest you answer. Again, I might be wrong, so don’t get mad at me if it’s wrong.

1 Like

thanks. everyone may make mistakes but thansk for links and trying to help. i’m still learning and i found your reply helpful