You are here: Re: Display same-page linked item on top - How to? « HTML « IT news, forums, messages
Re: Display same-page linked item on top - How to?

Posted by Richard on 08/14/07 13:19

On Aug 14, 8:15 am, Richard
<RichardDummyMailbox58...@USComputerGurus.com> wrote:
> Hi All,
>
> I've got a simple page athttp://home.comcast.net/~CaptQueeg/_Mian.html.
> It's got an Aptana section at the bottom which is the target of a link
> near the top of the page.
>
> When the Aptana link is clicked, I'd like the page to display the
> Aptana section at the very top. How can I do that with simple HTML?
>
> Thanks in Advance,
> Richard

Hi,

I discovered some of the problem: The W3C Markup Validator flagged
two errors, both caused by my code conflicting with the DTD I
specified. The Validator said:

<quote>
Line 14, Column 11: there is no attribute "NAME".

<h2 name="_Dummy1">_Dummy1</h2>

You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict"
document type with a document that uses frames (e.g. you must use the
"Transitional" document type to get the "target" attribute)
</quote>

The DTD I had used was:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


I found the Transitional DTD at http://www.w3.org/TR/html401/loose.dtd,
which I am now using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

The validator still gives me:
<quote>
Line 14, Column 11: there is no attribute "NAME".
</quote>

But I got this "name" attribute from http://www.w3schools.com/html/html_links.asp,
where it claims:
<quote>
<a name="tips">Useful Tips Section</a>

You should notice that a named anchor is not displayed in a special
way.

To link directly to the "tips" section, add a # sign and the name of
the anchor to the end of a URL, like this:
<quote>
<a href="http://www.w3schools.com/html_links.asp#tips">Jump to the
Useful Tips Section</a>
[snip]
<a href="#tips">Jump to the Useful Tips Section</a>
</quote>

Is this W3Schools stuff outdated? Any other suggestions?

Thanks in Advance,
Richard

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация