Jump to content
Killersites Community
Barbara

Problems with HTML links on page.

Recommended Posts

<!DOCTYPE html>
<html>
	<head>
		<title>Home Page</title>
	</head>
	<body>

	<p>This is my home page.</p>

	<p>Meet <a href="my-friends.html">my friends.</a></p>


	</body>
</html>

Still isn't opening up in browser as a hyperlink.  Any other suggestions.

Edited by Barbara

Share this post


Link to post
Share on other sites

 

4 hours ago, administrator said:

I'm not sure I am responding correctly.  I tried to submit the code right here and I was receiving an error.  I added it to my original post.  Sincerely, Barbara - 

 

Share this post


Link to post
Share on other sites

A couple of questions:

 

1) is "my-friends" an html file?  Does it have an extension (.txt .html, etc)?  If so, it must have that extension in the link.  I am running under the assumption that is is another page in your site and is called "my-friends.html".Make sure it has an html extension.  The names must match (file name and the name in your link)

<p>Meet<a href="my-friends.html"> my friends.</a></p>

2) If this is a file, it must be in the same directory as your index.html (or whatever you call you home page).  If not, you need to give a path to the file.  It is customary to have the html files of a site in the root directory and other things in sub directories.

<p>Meet<a href="directory/my-friends.html"> my friends.</a></p>

 

If I am barking up the wrong tree, clarify what you mean by not loading correctly.  Add a screen shot if you can.

Edited by MikeJones
  • Like 1

Share this post


Link to post
Share on other sites

Hi,

When inserting code into the forum, you may have to use the code option in the text editor menu (< >) .. anyway, try changing your code to this:

Meet <a href="my-friends.html">my friends.</a>

... You have to tell the web browser, what kind of file you are linking to. In this case, it is an html page. 

Makes sense?

Stef

Share this post


Link to post
Share on other sites
23 hours ago, administrator said:

Hi,

When inserting code into the forum, you may have to use the code option in the text editor menu (< >) .. anyway, try changing your code to this:


Meet <a href="my-friends.html">my friends.</a>

Makes sense?

Stef

I tried that and it still didn't open up in the browser as a hyperlink to my-friends.html.    Also I'm still having problems when I click on "Submit Reply"  That's why I had to edit my original post.  H E L P !!!!!

Share this post


Link to post
Share on other sites

Make sure that the page you are linking to is in the same folder/directory. So basically, if you have the link in index.html, be sure my-friends.html is sitting in the same folder.

Let me know.

Stef

Share this post


Link to post
Share on other sites

Glad I could help.

Now you will never make that mistake again! 

;)

.. Don't worry, we've all made the same one. Hyperlinks are probably the hardest tag to get your head wrapped around. 

Stef

Share this post


Link to post
Share on other sites

Hi,

I believe it is the web browser being strict about things. I forget the exact reason, but I believe it might have to do with the doctype you use ... which should be the HTML5 doctype these days of course. 

Stef

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×