Vaibhav_Chhabra2 Vaibhav_Chhabra2 - 4 months ago 15x
Javascript Question

HTML5 Anchors not working

I am working in HTML5 and this is my code and i am following this tutorial-

The code -

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="description" content="Vaibhav chhabra"/>

<a name="pageTop">Top of page</a>

<a href="html5.html#pageBottom">Bottom of page</a>

<a href="" title="Youtube Site website Titile" >Youtbe alone</a>


<p>Hello Worlddddd22222222dddddd</p>
<a href="html5.html#pageTop">Top of Page</a>
<a id="pageBottom">Bottom of page</a><br>

When i click on Page Bottom Hyperlink instead of taking me to the bottom of the page , it takes me to Page not found error ,same is the problem with Page Top.
Plz help


Basic HTML:

<!DOCTYPE html>
<title>Page Title</title>
<body> <!--Emphasis on the opening body tag and that is outside the <head></head> section -->



Creating an Anchor Tag.

The name attribute allows an anchor tag to be used to point to a specific place on a web page.

<a name="top"></a>
<a href="#top">Top</a>