Various basic problems and confusion from beginning / starting

Have index.html
in “C: / FolderCodingStuff”

Have “style.css”
in “C: / FolderCssStuff”

In vscode

When you have
<link rel="stylesheet" href="css/style.css">
It didnt work
Code in browser didnt show that css code worked

Am not sure if picked the right thing for "css/style.css" - but am not sure since user interface of vscode is very very confusing - not easy to use at all

Think vscode didnt show the right files as options when typing that in

And I dont know if the right file in “C: / FolderCssStuff”

Its the only file in “C: / FolderCssStuff”

 

Later just tired to put “style.css” into a different folder – this one: “C: / Folder CodingStuff” and then it showed the right file for the choices/options that pop up
Then it worked. Css coded showed on browser/site

Questions

  1. Do you need index.html and “style.css” in same folder or something
  2. Can they not be in different folders? Do they have to be a folder under same parent folder? "C: / “Main folder”
  3. Why basically does it do that in vscode, are there ways to fix this

From

This video is really really bad, lots of steps and things were not explained. Lots of steps were missing. A lot of things were not explained at all, and they just told you do things without 0 explanations or anything. Gonna do a little more but then am going to jump to any learning source to find something better

Also when you have something like

<style>

Are there anything that can automatically add the >

Like you type <style

Like maybe extensions or w/e else that can do that? Software/apps already know full code is

**<style>** 

So it should automatically add the >
Dont want to have to type it every single time for everything that would be painful

 

Also Are there any other ways to make “code syntax”

"This is code syntax"

Only ways found so far was pressing 4 spaces

And using the “code icon” in the editor in this forum

Are there any other ways?

Also why does pasting code not work?

  1. Is it because of the editor on this site/forum?
  2. Or is it because no “pasting code” would work on any sites?
  3. Or why basically?
  4. Is it because the editor can accept html/css code? And thats why it doesnt show?
pressing 4 spaces
why is this showing as green
oh looks like its being auto frommatted... 
and things are changing when you're typing stuff

 

Also why use and install ‘live server’ extension earlier in that video
Why did they say its bad to “not load from hard drive”?
Whats wrong or not good with/about doing that
Why cant we just do that

I haven’t seen the video and I don’t actively use vsCode so I will not be able to answer every question.
Here are the ones I can help with.

You can put the files anywhere you like.
You need to define the path to the css correctly in your link element.
I cannot tell you the path based on the information you gave here but it is doable with the correct path.

Yes. Use backticks around the code if it is inline. Or use three backticks on a separate line above the code block and directly below it.

This editor is supporting something called Markdown. (Pls look it up if you want to know it). So some of the html tags are getting interpreted (just like when the browser interprets the html). That is why you need the backticks to stop that from happening.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.