skip to Main Content

I’m a high school student, and my class and I just started exploring the world of HTML code. Yesterday, I wrote some basic HTML code and saved it on my computer. Today, I tried to open it, and instead of seeing usual HTML code, the editor showed me a preview.

I tried :

  1. disabling extensions in VS Code
  2. opening other HTML files
  3. opening files with TextEdit and Whisk (both showed me the actual code)

screenshot of the Visual Studio Code Editor showing a preview for an HTML file

I’m probably encountering a basic problem, maybe it’s not even a problem, but I honestly am lost. I don’t know how to get back to my code…

2

Answers


  1. 1- open your file with chrome and Right click on Page Select Show Source File and then copy that to your Vscode and then blah there it is your code.

    2- change the extension of your .html file to .php and then reverse that to html when your code has showed up.

    Login or Signup to reply.
  2. VS Code doesn’t have built-in support for HTML preview, but there are extensions available in the VS Code Marketplace. Open the Extensions view (Ctrl+Shift+X) and search on ‘live preview’ or ‘html preview’ to see a list of available HTML preview extensions. Then deactivate those plugins.

    After the completing above steps, if you are still having the same problem, please try to contact Microsoft Help Page
    https://learn.microsoft.com/en-us/answers/products/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search