Reputation: 21
Is there a way to use
<a href="test.html">test</a>
but when clicked it opens the html file as a text file, like what happens when you open a css file in your browser
Upvotes: 2
Views: 1374
Reputation: 1401
You need to use the file:/// protocol if you want to link to local files. So in your case paste file path with that three slashes.
Code Example:
<a href="file:///C:\test.html">test.html</a>
<a href="file:///C:\test.css">test.css</a>
I hope this will help you out if not, do let me know!
Upvotes: 2