Declan is creating a web page and wants a pop-up box to appear to ask the user to enter their name. How can this be accomplished?

A. By using a prompt function in CSS
B. By using a prompt function in HTML
C. By using a prompt function in JavaScript
D. By using a prompt function in Python

C. By using a prompt function in JavaScript

In JavaScript, you can create a pop-up box using the `prompt` function to ask the user to input their name. The prompt function will display a dialog box prompting the user to enter some data (in this case, their name) and return the value entered by the user. This value can then be used in the web page accordingly.