html page problem in the visual studio code

when i run my code in VS (macbook) it appear This site can’t be reachedlocalhost refused to connect. + http://localhost:8080/
how i can solve this problem and how to run in Firefox instead of Chrome

give me solution of this problem and how to run my code in Firefox