'how to display html data inside JavaScript prompt?

my idea is to convert JavaScript prompt into a popup or Dialog Model but it is not working as expected.

       <!DOCTYPE html>
       <html>
       <body>
       <button onclick="myFunction()">Try it</button>

    <script>
            function myFunction() {
              let person = prompt(
        "<h1>Please enter your name</h1> 
              <br> upload a pic 
               <input type='file'> ", "yes","no");
                      if (person != null) {
                // do something..
          }
        }
        </script>

        </body>
        </html>

is it possible to display html inside prompt ? just like dialog or popups.



Solution 1:[1]

Prompts are controlled by the browser. You can only provide a string to them. You can check the MDN Docs for more details.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 batuhanyndny