HTML: Anchor point - what is it?

Asked

Viewed 38 times

0

Can anyone tell me why the anchor point isn’t working?

<html>
<head>
<title> Lake Tahoe </title>
<style>
body {
    text-align: center;
}

h1 {
    font-size: 52px;
    color: white;
}

header {
    background-color: orange;
}

p {
    font-size: 20px;
    background-color: lightblue;
}

</style>
</head>

<body>
<header id="top">
<span> Journey through the Sierra Nevada Mountains</span>
<h1>Lake Tahoe, California</h1>
</header>
<p>
Lake Tahoe is one of the most atractions located in California. Lake Tahoe is one of the most atractions located in California. ILake Tahoe is one of the most atractions located in California.
</p>

<p>
Lake Tahoe is one of the most atractions located in California. Lake Tahoe is one of the most atractions located in California. ILake Tahoe is one of the most atractions located in California.
</p>

<p>
Lake Tahoe is one of the most atractions located in California. Lake Tahoe is one of the most atractions located in California. ILake Tahoe is one of the most atractions located in California.
</p>

<footer>
<p>All rights reserved.</p>
<a href=“#top”> Back to top </a>


</footer>
</body>
</html>

1 answer

3

Instead of

<a href=“#top”> Back to top </a>

Utilize

<a href="#top"> Back to top </a>

(In its original version, the property definitions href are not single double quotes, and therefore considered as part of the link.)

  • Thanks for the help! Can you explain to me pff the difference between the code snippets? They seem to be the same

  • @Davidmonteiro the characters and are different from ". Only the latter is recognised as a valid delimiting code.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.