Why aren't my links clickable in my HTML?

I am a complete newbie to html. Right now I am learning about how to post up links on a webpage. However, none of my links are clickable or even appearing underlined blue when I type in the code. I’ve been trying to figure this out for some time now but I guess I need a bit of help. The code seems to work when I type into this forum but it doesn’t when I open the file on my web browser. Here is the code from one of my practice sessions:

html

<html>

	<head>
	<title>My First Web Page</title>
	</head>
<body>
	<h1>Welcome to My First Web Page</h1>
	<p>This is an HTML page that I created in TextEdit</p>
	<a href:”https://www.rottentomatoes.com”>rotten tomatoes</a>
</body>

</html>

Here is a picture of what the content looks like on my web browser.



I don’t think i’m doing anything wrong and i’m super stuck. Any help on this would be greatly appreciated. Thanks!

should be href=”

3 Likes

Welcome to the forums, @holdenseguso1.

You have a simple typo.
<a href:”https://www.rottentomatoes.com”>rotten tomatoes</a>
should be
<a href="https://www.rottentomatoes.com">rotten tomatoes</a>

Also make sure you’re using “straight” quotes. Use a text editor to write your code; Word and similar will change the quotes to angled “smart” quotes, which you don’t want.

2 Likes

Out of interest you can get code checkers; I always used html check or what ever it is called in Firefox. You opened your page in the browser and in the toolbar you had an option for view source and it would highlight any problems like this. I think it may not be supported any more but there are other similar plugins available for most browsers.

1 Like

Thanks for the advice. I’m using plain text in my standard Mac text editor and the angled quotation marks are the the default. Is there a way to change this?

You should preceed the first line with a valid doctype such as <!doctype html>

so the HTML begins like this:

<!doctype html>
<html>
<head>
    <title>my title</title>
</head>
<body>
...etc...
</body>
</html>

Without a valid doctype, it may render inconsistently in different browsers/devices, and it will fail validation.

https://validator.w3.org/nu/

1 Like

Yes, but you will have to read the documentation for your text editor. Perhaps someone else here uses the same editor and can tell you.

I use a text editor, but not a Mac. Sorry.

2 Likes

@holdenseguso1: unclick ‘smart quotes’ in the options section of textEdit preferences. that should do the trick

4 Likes

If you are on mac and using a editor that is auto correcting your code. I would suggest looking into “brackets” there’s a mac version or notepad++

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