The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Inner Page HTML Anchors, Fixing Inner HTML linking
whosaidmoo
post Dec 8 2014, 01:03 AM
Post #1





Group: Members
Posts: 6
Joined: 8-December 14
Member No.: 21,907



I am making a personal website that is going to have a blog and I am having some trouble writing the HTML. I have posted a copy of what I have and I know where the couple issues are coming up but dont know how to fix them. I took the end tags off in case the HTML shows up on this forum.

Can you tell me why the link using the <a href="#post1" is not working in this code? It brings me to an error page and I thought it was supposed to bring me to that area of the page.

Thanks in advance for your help!!




<!doctype html

<html
<head
<title Jared Magid’s Webpage </title

</head
<body

<h1
Welcome to My Website!
</h1


<hr /
<h2 Table of Contents </h2
<a href=”#Post1” title=”First Post” Post 1</a <br /
<a href=”#Post2” title=”Second Post” Post 2</a> <br /



<h3 <a name=”Post1” </a Blog Post 1 </h3
<p POSTPOSTPOST</p


<h3 <a name=”Post2”></a Blog Post 2 </h3
<p POSTPOSTPOST </p






</body
</html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 8 2014, 01:54 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



All your tags lack the closing >. Even the doctype (that isn't a tag).

Also, you don't need to use A name="". See:
http://htmlhelp.com/faq/html/links.html#named-anchor
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
whosaidmoo
post Dec 8 2014, 03:36 AM
Post #3





Group: Members
Posts: 6
Joined: 8-December 14
Member No.: 21,907



The addition of the end tag was just to make sure it didnt post in html. This is my first time using these boards.

I tried doing what the portion you pulled up was referencing, but it wasnt working for me. can you see what is broken here? I am also a little confused about end tags. should the / always be at the front or should it be at the end or does it matter?



<h2> Table of Contents </h2>
<a href=”#Post1”> Post 1</a> <br />
<a href=”#Post2”> Post 2</a> <br />



<h2 id="Post1"><a name="Post1"> Blog Post 1 </a> </h2>
<p>POSTPOSTPOST</p>


<h2 id="Post2"><a name="Post2"> Blog Post 2 </a> </h2>
<p> POSTPOSTPOST </p>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 8 2014, 07:43 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



You use the wrong kind of double quote characters here:

CODE
<a href=”#Post1”>

use normal double quotes like these instead:

CODE
<a href="#Post1">

(and avoid the software that created the first ones).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 8 2014, 09:02 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Yep. And there's no point in using an ID if you still use A name="".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
whosaidmoo
post Dec 8 2014, 01:06 PM
Post #6





Group: Members
Posts: 6
Joined: 8-December 14
Member No.: 21,907



Awesome thank you for the comments! I wrote it in word and had to transfer it to notepad. Thats crazy that makes it work!

Thank you for your help!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 09:05 AM