473,805 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<a name=foo> close?

This seems too simple by I can't find the answer.

Must <a name="foo"> be closed with </a> ?
Must it have content?

W3C says the content cannot be block so what if :

<a name="foo">
<h2>Foo Is Good</h2> ( a likely location )

Where does the closer </a> go?

<a name="foo">&nbs p;</a> is ok but uses a line
<h2>Foo Is Good</h2>

Mason C
Jul 24 '05
30 2851
On Thu, 7 Jul 2005 17:26:53 +1000, Mark Parnell
<we*******@clar kecomputers.com .au> wrote:
Previously in comp.infosystem s.www.authoring.html, Mark Parnell
<we*******@cla rkecomputers.co m.au> said:
Previously in comp.infosystem s.www.authoring.html, "Mason A. Clark"
<ma************ *@ix.netcom.com > said:
Must it have content?


Yes, as above.


My bad. No, it doesn't have to have content.


But content is necessary for Opera to find it.

In Opera <a name="foo"></a> does not work.

In IE6 <a href="top"> goes to the top of the page even if there
is no <a name="top"> of any kind.

IE6 recognizes "top" . Other <a href="goo"> do NOT go to the top.

Is it just me? Or am I the only one testing?

Mason C


Jul 24 '05 #11
Mason A. Clark <ma************ *@ix.netcom.com > wrote:
Must it have content?

Yes, as above.


My bad. No, it doesn't have to have content.


But content is necessary for Opera to find it.


http://homepage.ntlworld.com/spartanicus/empty_link.htm

Works in Opera 4, 5, 6, 7 & 8.

--
Spartanicus
Jul 24 '05 #12
Els
Mason A. Clark wrote:
On Thu, 7 Jul 2005 17:26:53 +1000, Mark Parnell
<we*******@clar kecomputers.com .au> wrote:
Previously in comp.infosystem s.www.authoring.html, Mark Parnell
<we*******@cl arkecomputers.c om.au> said:
Previously in comp.infosystem s.www.authoring.html, "Mason A. Clark"
<ma************ *@ix.netcom.com > said:

Must it have content?

Yes, as above.


My bad. No, it doesn't have to have content.


But content is necessary for Opera to find it.

In Opera <a name="foo"></a> does not work.


Opera responds to id="foo".

<a name="foo" id="foo"></a> works for all browsers that I've ever
tried.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 24 '05 #13
On Fri, 8 Jul 2005 09:30:50 +0200, Els <el*********@ti scali.nl> wrote:
Mason A. Clark wrote:
On Thu, 7 Jul 2005 17:26:53 +1000, Mark Parnell
<we*******@clar kecomputers.com .au> wrote:
Previously in comp.infosystem s.www.authoring.html, Mark Parnell
<we*******@c larkecomputers. com.au> said:
Previously in comp.infosystem s.www.authoring.html, "Mason A. Clark"
<ma************ *@ix.netcom.com > said:

> Must it have content?

Yes, as above.

My bad. No, it doesn't have to have content.


But content is necessary for Opera to find it.

In Opera <a name="foo"></a> does not work.


Opera responds to id="foo".

<a name="foo" id="foo"></a> works for all browsers that I've ever
tried.


Try this validated page on the world's best browser, Opera:

http://masonc.home.netcom.com/1template-1.html

Look for the "Return to the top" link at the bottom of the page.
Look for your <a name="top" id="top"></a> below <body>

Opera needs content in <a...></a> IE6 and Firefox do not.

Mason C (now I have to go stuff content in all my 47 pages)
Jul 24 '05 #14
Els
Mason A. Clark wrote:

(now I have to go stuff content in all my 47 pages)

"find and replace" - shouldn't take you longer than 5 seconds.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Yes - Going For The One
Jul 24 '05 #15
Mason A. Clark wrote:
But the W3C site says:

"However, browser support for ID link destinations is very poor, so A NAME will
be needed for quite awhile. "


Really? Where does the W3C say that?
Jul 24 '05 #16
"Mason A. Clark" wrote:

This seems too simple by I can't find the answer.

Must <a name="foo"> be closed with </a> ?
Must it have content?

W3C says the content cannot be block so what if :

<a name="foo">
<h2>Foo Is Good</h2> ( a likely location )

Where does the closer </a> go?

<a name="foo">&nbs p;</a> is ok but uses a line
<h2>Foo Is Good</h2>

Mason C


Any <a> tag requires a closing </a>. This is because the anchor
(element using the <a> tag) may indeed have content; thus, a
closing tag is required to end the content whether or not the
anchor has any actual content.

When I use the NAME attribute, I use a blank content:
<a name="foo"> </a>
I put this just before the section of the page to which I want it
to apply. Thus:
<a name="foo"> </a>
<h2>Foo Is Good</h2>
I do it this way because selecting the link
<a href="#foo">Go To Foo</a>
with some browsers positions the window with the anchor at the very
top of the page. With the anchor before the applicable section,
the section is then positioned slightly below the top of the page.

I use the NAME attribute for the anchor instead of ID because NAME
is specifically the attribute for "the destination of another link"
(HTML 4.01 specification). The ID attribute is more general and
thus less mnemonic. Since I manually edit my HTML, mnemonic
markups are very important to me if I am to modify a page I haven't
touched in over a year.

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
Jul 24 '05 #17
On Fri, 8 Jul 2005 10:49:20 +0200, Els <el*********@ti scali.nl> wrote:
Mason A. Clark wrote:

(now I have to go stuff content in all my 47 pages)

"find and replace" - shouldn't take you longer than 5 seconds.


15 seconds actually, lock load and fire, for about 33 pages -- some long.

I use Search and Replace from http://www.funduc.com -- a superb program.

Note that "wild card" is needed to search/replace <a name=*></a> where
there may be other ></a> 's not <a name 's

Mason C
Jul 24 '05 #18
On Fri, 08 Jul 2005 10:51:35 -0700, David Ross <no****@nowhere .not> wrote:
"Mason A. Clark" wrote:

This seems too simple by I can't find the answer.

Must <a name="foo"> be closed with </a> ?
Must it have content?

W3C says the content cannot be block so what if :

<a name="foo">
<h2>Foo Is Good</h2> ( a likely location )

Where does the closer </a> go?

<a name="foo">&nbs p;</a> is ok but uses a line
<h2>Foo Is Good</h2>

Mason C
Any <a> tag requires a closing </a>. This is because the anchor
(element using the <a> tag) may indeed have content; thus, a
closing tag is required to end the content whether or not the
anchor has any actual content.

When I use the NAME attribute, I use a blank content:
<a name="foo"> </a>


Opera does *not* recognize this. I tested it just now.
IE6 and Firefox do. Opera requires actual content which
a space is not.

Mason C

I put this just before the section of the page to which I want it
to apply. Thus:
<a name="foo"> </a>
<h2>Foo Is Good</h2>
I do it this way because selecting the link
<a href="#foo">Go To Foo</a>
with some browsers positions the window with the anchor at the very
top of the page. With the anchor before the applicable section,
the section is then positioned slightly below the top of the page.

I use the NAME attribute for the anchor instead of ID because NAME
is specifically the attribute for "the destination of another link"
(HTML 4.01 specification). The ID attribute is more general and
thus less mnemonic. Since I manually edit my HTML, mnemonic
markups are very important to me if I am to modify a page I haven't
touched in over a year.


I agree and I use "name". However, Opera, IE6, and Firefox do
recognize id *or* name. ( with content, e.g <a name="foo">&nbs p;</a> )

Jul 24 '05 #19
David Ross <no****@nowhere .not> wrote:
When I use the NAME attribute, I use a blank content:
<a name="foo"> </a>

Mason A. Clark <ma*******@THIS ix.netcom.comQQ Q> wrote: Opera does *not* recognize this. I tested it just now.


After reading all this "discussion ", I had to try it myself. Here's the
test setup I used.

In foo.html:

<!-- Several screenfuls of Lorem Ipsum -->

<a name="foo"> </a>
<h2>foo</h2>

<p><a href="bar.html# bar">go to bar</a>
<p><a href="foo.html# baz">go to baz</a>

<!-- Several screenfuls of Lorem Ipsum -->

<a name="baz"> </a>
<h2>baz</h2>

<p><a href="#foo">go to foo</a>

<!-- Several screenfuls of Lorem Ipsum -->

In bar.html:

<!-- Several screenfuls of Lorem Ipsum -->

<a name="bar"> </a>
<h2>bar</h2>

<p><a href="foo.html# foo">go to foo</a>

<!-- Several screenfuls of Lorem Ipsum -->

Opera 8.01 on MS Windows worked just fine with all 3 types of links:
href="#tag", href="thisdoc#t ag", and href="otherdoc# tag", with local files
and with documents from an HTTP server, with no DOCTYPE and with HTML 4.01
Strict, with <a name=...></a> and with <a name=...> </a>.

In what situation did Opera not recognize this type of anchor? And what
version of Opera?
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"Nice is different than good." - Sondheim (LRRH, "Into the Woods")
Jul 24 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2315
by: Fredrik Melin | last post by:
Hi, I have a vendor that requires me to send empty value, e.g. <OrderIDInfo /> problem is that my xslt need to add attributes, doing this <OrderIDInfo> <xsl:attribute name="orderID"> <xsl:value-of select="Root_Element/InvoiceHeader/Customer_PO_No" /> </xsl:attribute>
18
3132
by: lchian | last post by:
Hi, I have a vector of class Foo. When I do a push_back(), I expect stl to call the default constructor I wrote for Foo. But instead, stl makes up its own default that is initialized with garbage. Is there a way to force stl to use MY default constructor?
8
4892
by: Joseph Turian | last post by:
Some function requires a vector<const foo*> argument. How can I cast a vector<foo*> to vector<const foo*>? Thanks! Joseph
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.