There is no
href tag.
href is an attribute of the
a tag.
a is for anchor.
Tags are closed with a / not a \ so
<a href="example.com">Example</a>
is valid.
Your problem is that you're linking to your files incorrectly.
Throughout your solution you need to consistently link to locations in your own directoy structure. If you're never going to move your project you can always set the href attribute to
<a href="/myproject/mypage.html">Example</a>
You have to realize here that the
/ in the beginning of the path means the browser will look to the root of the website. So no matter what page you're on, for
example.com/this/is/my/app/index.html any link on this page that specifies
<a href="/myproject/mypage.html">Example</a>
will always point to
example.com/myproject/mypage.html
You specify the current directory like so
<a href="myproject/mypage.html">Example</a>
this will point to
example.com/this/is/my/app/myproject/mypage.html when the user is on
example.com/this/is/my/app/index.html
So links starting with
/ are absolute and they link to the root of the current site if you omit the beginning
/ your link is relative to the current path.
You can also specify
<a href="./myproject/mypage.html">Example</a>
to point to the current directory.
Additionally you can specify
<a href="../myproject/mypage.html">Example</a>
this will move you up one directory. So the link above on the page
example.com/directory/index.html will point to
example.com/myproject/mypage.html.
Keep in mind that you can combine ../ with one or more ../ to move up more than one directory.
This
<a href="../../myproject/mypage.html">Example</a>
is totally valid and will move you up two directories.
I want to take this a little further. When you see an address
example.com/article.html?id=101 this is passing a
GET variable named id with the value 101 to article.html residing on the root directory of the webserver. You can use
GET vars on a directory index. A directory index is a default file that's served by the server when no file is specified. So
example.com when requested the server will load the default file generally index or default .php or .htm or .aspx or whatever. So the link example.com?id=101 passes a
GET variable with the name id and value 101 to the directory index of
example.com.