skip to Main Content

I am facing a problem.
simply I have a bunch of HTML-related files that I want to run locally on an Android device
for example, I have an index.html file it contains links to other HTML files when I try to click on those links to navigate to another HTML file I get "ERR_FILE_NOT_FOUND"

an exaple of an anchor tag <a href="add-component.html" >

I am wondering if am I doing something wrong
all the files are in the same directory and are spelled right and with valid .html extension every file run separately

I have tried using different web browsers

2

Answers


  1. If your index.html file and add-component.html file are in the same directory, you can use the following code for your anchor tag:

    <a href="./add-component.html">
    
    Login or Signup to reply.
  2. For local files you gotta use "file:///" at the start like this:

    <a target="_blank" href="file:///add-component.html">
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search