Links in html code going to the wrong place


#1

So, in my hml code I put a link from the first page of the website I’m making, to an already existing one. I even tried a few different ones just to see if there was a particular problem with one. Anyway, the link is going to an alleged file in my computer and then saying it can’t be found (because it doesn’t exist), rather than going to the website out there on the internet.

Example…

Let’s say I’m trying to make a link to SoundCloud, that is… https://www.soundcloud.com

What I get is a link to…

file:///Users/myname/Desktop/(bunch of gibberish letters and numbers)https://soundcloud.com/my_name(bunch of gibberish letters and numbers)

So it’s as though clicking on the link to SoundCloud is just sending me to the folder on my computer, which doesn’t exist, which would have the website SoundCloud in it. If I’m understanding it correctly, that’s what’s going on. Why? I do not know.

Thanks everyone in advance for your help!


#2

can you share the html file?


#3

Well I’ve since deleted it all and tried to restart. But I figured this was a general question.

I don’t need to be taught the basic link text

I used that. But like I said above, it’s not going to the url I have typed in. It’s going to a folder in my computer instead.

I can redo some code and send it if a general answer is impossible.


#4

but the only way for me to troubleshoot the problem is by replicating the problem.

A general answer is impossible, because it sounds like you did it right.

<a href="https://soundcloud.com">soundcloud</a> should take you to soundcloud website. The http(s) bit is important, but you did that. you could attempt https://www. but it shouldn’t matter.


#5

Oh yeah, that makes sense.

<!doctype html>
<html>
<head>
<title>Musician Name</title>
</head>
<body>
<h1>Musician Name and Info</h1>
<p>Musician name was educated at the following institutions: </p>
<ol>
<li>Institution(MA)
<ul>
<li>Teacher 1</li>
<li>Teacher 2</li>
</ul>
</li>
<li>Institution (MA)
<ul>
<li>Teacher 1</li><li>Teacher 2</li>
</ul>
</li>
<li>Institution (BAs)</li>
</ol>
<h2>The Man</h2>
<p>written description</p>
<h2>The Sounds</h2>
<p>
<ul>
<li>
<a href=“https://www.soundcloud.com”> SoundCloud Profile</a>
</li>

</ul>
</p>
</body>
</html>

#6

I also read somewhere there can be a different computer response to typing in a URL manually versus copying and pasting it from an address bar.

But I tried both of these possibilities and neither changed the undesirable outcome.


#7

that explains a lot, the around your url look like smart quotes, they should be regular quotation marks in order to work properly


#8

Does that mean I just type them individually? Instead of pressing shift?


#9

I tried all ways of entering quotes: double, single, using the shift key to make the double quotes, not using the shift key to make the double quotes…

Nothing has changed the outcome yet.


#10

So I found this site to do it for me, and that did the trick…

https://dan.hersam.com/tools/smart-quotes.html

There has to be an easier way to type regular quotes though I would think.

Anyway, thank you for your help @stetim94


#11

what editor do you use? Maybe it has to do with the editor you use, it must be possible to change that somewhere.


#12

Hey sorry for the delay…

I use TextEdit. It seems the other one recommended frequently on here, Notepad++, is not available for Mac.

I did find a place to change it eventually. Way unnecessarily complicated haha.

Thanks again for your help.


#13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.