How do I add a hyperlink in one HTML file to another HTML file?

Jasiczak-Knop, Natalia 0 Reputation points

I have a Documents folder, which is a Document Library type. Inside, I have a temp folder that includes two HTML files: a.html and b.html. In the a.html file, I have a link to the b.html file (<a href="b.html">B file</a>). When I open the a.html file using an HTML viewer and click on the B file hyperlink, I receive a "404 NOT FOUND" notification. I also tried using the absolute path without success. I know that I can use Pages in the Page library, but this solution doesn't help me enough.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,073 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,726 Reputation points Microsoft Vendor

    Hi @Jasiczak-Knop, Natalia,

    You could use copy link in sharepoint library html viewer to get the url of B file. User's image

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. Jasiczak-Knop, Natalia 0 Reputation points

    Hi @RaytheonXie_MSFT
    this is my folder
    User's image

    in file a.html in href paste copied link to file b.htmlUser's image

    But when I open file a.href and click on the hyperlink to file B, I have a blank page

    Open file a.htmlUser's image

    When you click the link to file B
    User's image

    The page is blank and the file name is still a.html instead of b.html, why?