0

when I tried to execute a code in VS code related to HTML I got "code language not supported or defined" error. My language mode is in HTML, Code Runner is installed, but can't find a way. What should I do?

I tried changing code. I rechecked language mode, tried several times. none was helpful.

starball
  • 20,030
  • 7
  • 43
  • 238
soniya
  • 1

1 Answers1

0

One does not really "run HTML". One can run a server that serves the HTML page, or open the HTML in a browser via the file:// protocol. I suppose you could look for a command for your specific browser to launch an instance of it with a new tab at a specific file:// URL. See also the code-runner.executorMap setting.

But really I'd suggest that you take a look at the "Live Server" extension if you want to locally test some local HTML (I have no affiliation with this extension).

starball
  • 20,030
  • 7
  • 43
  • 238