Error with html pages

Hi I have created two html pages which are in my laptop I have to link the two pages,as they are in my laptop i am not able to access this page in other devices can anyone help me out

@indus19 as you have made the 2 html pages in your local host machine that is why you will not be able to view them on other devices unless they are not available on internet / server.

You can deploy those 2 html pages on github and then you can download them on any device.

Because other than this you must be needing some hosting services so that 2 pages are on the internet, which in your case will be of no use

@indus19 why do you need to see those pages from different device?

Hi when I save my code in git hub is save it as code only but to link the 2 html pages I need html page to be saved what to do now

@indus19 can you elaborate it properly!

As far as I am understanding, you have 2 html pages and you have to link them together.

Say you have to go to second html page when you click on a button which is present in the first page, then you just have to specify the second html page path in the anchor tag.

In the anchor tag, specify the href attribute as second.html (name of that html page) . It will be linked to the new page

This way when you will download the repository via github, you can go back and forth from one page to another.

You can host your webpage/site for free on Github Pages !
If you want proper steps, then do respond.

Yeah can u tell me the steps

I have done a if condition to switch to another page

This line is only to use within your local machine. When you host it, the materials, html pages, css must be uploaded on the internet, so that it can be accessed.

Ofcourse you cannot access Local Disk D from your phone when it is not on a server. That’s basic network and fundamentals of Internet.

About hosting it on GitHub -

  1. Create New repository. Keep any folder name, such as “WebView”
  2. Upload your files on the webviewa Repo.
  3. Such that 1stPage.html and 2ndPage.html
  4. Add the below line on the 1stPage.html and edit likewise to link to the other page.
<a href="2ndPage.html"> Click here </a>
  1. On the same repo, visit Settings > Pages > Change Source, branch - master, dir - /root and SAVE changes. The website URL will be visible to with a green tick.

In case you don’t have much idea about GitHub, I recommend you to take time and read through the documentation and understand how Git works.

you have to use the attribute to link the second page to the first. Also, they need to be in the same folder or else enter the proper location of the second page followed by the name.html in the command. for eg

And you can only view this webpage on your local device until you host it. Github provides free hosting of web pages. You can log in and create a new repository and add all your files there.
Then follow these steps–
Open Settings > Pages > Change Source, branch - master, dir - /root and SAVE changes. The website URL will be visible with a green tick.

And then you can share the URL and open webpages on which device you want with that link
I hope it helps! @indus19

You can also use other services like heroku, netlify, etc to host your website. They have a free plan.