/    Sign up×
Community /Pin to ProfileBookmark

i am look for a way to make it so that when someone clicks on a link on a web page, that the page will scroll down to where that paragraph of information is. If you know how to do this please share. [email][email protected][/email]

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@Tim158Mar 22.2005 — <a href="#newSection">Go to new section</a>

.

.

.

<a id="newSection"></a>

<h2>New Section</h2>

That'll do it.
Copy linkTweet thisAlerts:
@Helena88Mar 22.2005 — I agree.. anchor it. ?
Copy linkTweet thisAlerts:
@KdariusauthorMar 22.2005 — thanks but i am new to web design where do i put this information on the link and can you have these in different frams. Can you have it where when you click on the link a web page will open and go straight to that part. I am really sorry about my lack of knowlege.

thank you [email][email protected][/email]
Copy linkTweet thisAlerts:
@Wart_HogMar 22.2005 — Do you like ice cream?

Lets say our page is called icecream.html.

***NAVIGATION***&lt;a href="icecream.html#choc"&gt;Chocolate&lt;/a&gt;
&lt;a href="icecream.html#van"&gt;Vanilla&lt;/a&gt;
&lt;a href="icecream.html#cof"&gt;Coffee&lt;/a&gt;
***CONTENT***&lt;p id="choc"&gt;Chocolate is good&lt;/p&gt;
&lt;p id="van"&gt;Vanilla is better&lt;/p&gt;
&lt;p id="cof"&gt;Coffee is more-better&lt;/p&gt;
NOTE: the values of "id" must be unique.

Take a look at this url. Then view the source.

http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.3

-Mike
Copy linkTweet thisAlerts:
@KdariusauthorMar 22.2005 — Thank you gor the help guy.

Sorry about the ingnorance

Thank you

[email][email protected][/email]
Copy linkTweet thisAlerts:
@Helena88Mar 22.2005 — Find the page, and the exact paragraph. Before the paragraph put this

[b]<a name="SPECIAL"></a>[/b]

This pretty much marks the document and says, "Hey this is a special point!"

Now you said you're using frames right? Well this isn't going to be any different than opening it in a new window or anything. You just have to add where you'd like the page to open, for this you use, [b]target="variable"[/b].



All together your link would look like this:

[b]<a href="URL#SPECIAL" target="FrameName">Click Here</a>[/b]

To break it down:

URL = location, like: http://www.yoursever.net/demonstration.html

#SPECIAL = which paragraph?! when the browser is calling the url you specified, it will also then direct you to that special paragraph since you've asked it to.

FrameName = what frame you want it to go to

You can mark many paragraphs in that document and give them all different links! Make sure their names are all different though!

I hope that helps, I'm only 16, so I don't know how knowledgeable I really am at this kind of thing. ?
×

Success!

Help @Kdarius spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...