iv35120•

Body shouldn't be in head....

12
ernee_gaming•

True, but still strange inconsistency.

3
ElnuDev•

Get the Live Server extension

7
DiskFormal•

Yeah pull that body out of the head and that might be the "typo"?

Also if you open the file in your browser and make edits in VS Code, you can just refresh the browser to see the updates (so you don't have to run that command every time)!

Happy hacking!

2
HoloKolaMasterRace•

that is not the typo, as other users pointed out, chrome can't find the url (path in this case) to the file.

1
DiskFormal•

Right...hence the quotes 🤗

And I don't care what the issue is....the body tag doesn't belong in the head tag...

1
nosoupforyou•

It can't find the url. You probably need to go into project settings, select the web settings, and check the settings.

1
Kwolf21•

Can't see the URL/URI the chrome window is trying to connect to. If I had to guess, it's probably trying to load "index.html" as the whole link, which it can't. It should be pointing to "c:/your/whole/path/to/index.html" - if it is, I'd check your project settings.

For what it's worth, just open it from your explorer, and refresh the page whenever you save changes to your html file, and the page will reload with the new code!

The command

start chrome.exe "c:/your/path/to/index.html"

should also work from the VSC Term

1
J22CharlesOP•

It’s not pointed to c:/ by chance can you tell me how to set it up

1
Kwolf21•

It's in the comment you replied to

1
neftalito•

I recommend you using visual code

1
Icarus_Nine•

Can code but can't take screenshots. Christ.

1
[deleted]•

[deleted]

1
25_hr_photo•

It would seem that running it is actually working, but since VSC terminal doesn’t interpret HTML, only a browser would be able to actually interpret it as you want. Try right clicking on the HTML file and opening Live Server. It’s the best way to see updates in the moment!

-1
NatoBoram•

Look at the command, he's starting a Chrome window, not asking CMD to open index.html.

3
ernee_gaming•

Tho i don't know what does the start command do. Why not just chrome index.html?

1
NatoBoram•

Learn how to do this with Notepad++ before you use VSCode. Once you know what you are doing, VSCode will be very helpful, but right now it's a hindrance to you because you know too little.

-3
Kwolf21•

Disagree. Starting in VSC is probably the best way to go. Maybe dont jump straight into terminal commands, but still VSC is far superior to np++ in just about every single way. While I started with notepad and switched to NP++ many many years back, once I started using VSC, I was infuriated I hadn't been using it all along.

2
NatoBoram•

VSCode is absolutely my favourite editor, but you should learn how to make an empty project work without it before you make one with it. Otherwise, you end up like OP.

1
Kwolf21•

OP is clearly just learning how to code. Notepad++ won't provide you any insight as to where you're going wrong, which will only lead to more copy pasting from Stack, lol.

VSC will help debug your code far better than np++ ever will. Np++ is a glorified plain text editor with syntax highlighting.

2