Home > database >  Linking CSS to HTML
Linking CSS to HTML

Time:03-09

enter image description here

This is the updated code with relative path

CodePudding user response:

When you link a CSS or JS file to an HTML file, you need to provide a relative path from the HTML file to the CSS or JS file. In this case, it looks like index.html is already in the Root directory, so you shouldn't include that in the CSS file paths. The relative path to the css files (the path from the directory where index.html is to where the css file is) would be /Css/index.css, and the same for your javascript files (`/Scripts/index.js').

  • Related