Am trying to learn web development by creating a website my own instead learning every single theory written on a textbook.

Currently am trying to link a stylesheet and favicon on my root folder into the file called debian.html and debian-post-install.html. But it's not working and I don't know why.

code used inside both html files head section are,

<link rel="stylesheet" href="/styles/style.css" />

<link rel="icon" type="image/png" href="/images/favicon.png" />

To point to the root directory files or directories we use / in html instead of ../ right? Then why it's not working.

Also I need advice on how bad is my html file structuring and what changes recommended.

Solution

<link rel="stylesheet" href="../../styles/style.css" />

<link rel="icon" type="image/png" href="../../images/favicon.png" />

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 2 points 4 weeks ago* (2 children)

Am opening the html files in a web browser by double clicking it.

Yeah, that makes sense. Thanks.

Is there any other way I can define the path so the update directly visible in the web browser? Or the only way to do it is by changing the file structure?

  • source
  • parent
  • hideshow 2 child comments