Home > OS >  Textfile.txt hyperlink not functioning in html? Not clickable
Textfile.txt hyperlink not functioning in html? Not clickable

Time:12-17

I put my resource.txt txt file with a link in it to the website I am trying to recreate as a reference. When I go to click on the text file in the html browser it shows up as a blue link that does not open when clicked, even when it is just plain text in the text file.

I should be able to click this text link am I right?

Could someone please help me with linking a clickable text file inside html?

Thanks for assistance in advance.

Here is my html:

<a href="resource/resource.txt"> Resources </a>

inside the resource.txt is a link to the reference website.

Tried changing the link to plain text. Didn't work

CodePudding user response:

what is the file structure of your project? you may be accessing the wrong file path. when hovering over the location of your resources.txt file right click on it if you are using vs code and select copy relative path.

CodePudding user response:

Make sure that the URL in the href attribute is correct. You can check this by entering the URL into your browser's address bar and seeing if the text file is displayed correctly.

Make sure that the text file is located in the correct location on your server. If the file is located in a different folder or on a different server, you will need to update the URL in the href attribute to reflect the correct location.

Make sure that the text file is accessible to the user. If the text file is located in a password-protected area of your site or is only accessible to certain users, the user may not be able to access it.

  • Related