Related Articles

Related Articles

How to make an HTML link to open a folder?
  • Difficulty Level : Expert
  • Last Updated : 14 Apr, 2020

HTML can be used to open a folder from our local storage. In order to open a folder from our local storage, use ‘HREF’ attribute of HTML. In the HREF attribute, we specify the path of our folder.

Syntax:

<a href="Path"></a>

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<head>
    <title>Sample Code</title>
</head>
 <body>
    <h1>Opening a folder from HTML code</h1>
    <a href="D:\Series\Breaking Bad">Click to open a folder</a>
</body>
</html>

chevron_right


Output:

On clicking the link:



Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<head>
    <title>Sample Code</title>
</head>
 <body>
    <h1>Opening a folder from HTML code</h1>
    <a href="C:\Users\ABC\Desktop\cpp">
        Click to open a folder
    </a>
</body>
</html>

chevron_right


Output:

On clicking the link:

full-stack-img




My Personal Notes arrow_drop_up
Recommended Articles
Page :