Coding Dojo
Coding Dojo

Reputation: 3

How do I add another coding workspace in Visual Studio Code

I am trying to add an about.html to my website, but whenever I click the link nothing happens. I'm trying to connect to another workspace. I have already done js and CSS, but this about page's link isn't working. Here is my code:

<link rel="stylesheet" href="about.html" type="text/html" />

Upvotes: 0

Views: 98

Answers (3)

sunny
sunny

Reputation: 49

first check wether you are trying to access a file like style or js or want to create a link. if you want to create a link then use anchor tag for the same e.g about us

and the it will work as link to access about page.

Upvotes: 0

user16639239
user16639239

Reputation:

Your code should be like this.

<a href="about.html">About</a>

<a href="index.html">Index</a>

Ping me if this is what you want.

Note: Question is not understandable so this answer is kind of guess that he/she may be need this.

Upvotes: 2

Amini
Amini

Reputation: 1792

The way you're trying to reference the about.html is true and there's no matter about it, it might be because of the wrong address you gave.

  1. If about.html is in the same folder the link you wrote is write. also link="./about.html" would be true.

    ++ main
         -- index.html
         -- about.html
         -- style.css
         -- script.js
    
  2. If about.html is in a folder you must give the name like this link="folder/about.html, This must work if the structure of your folder is like this:

    ++ main
         -- index.html
         -- style.css
         -- script.js
    
         ++ folder
                -- about.html
    
  3. If your about.html is in the previous folder of the main you should use .. link="../about.html" to go back one step like this:

    about.html
    
    ++ main
           -- index.html
           -- style.css
           -- script.js
    
  • and use ../../about.html to go two steps backward.

This is all you need, if this doesn't work, you're referencing the wrong address.

Upvotes: 0

Related Questions