473,805 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Empty Anchors, I can't find a W3C specification for it

Hello,
I am little surprised about the following:
<a href="#" ...

I found some lines about the href tag for a site should point to an
name or in XHTML to an ID,
but in both cases this seems to be not valid name="#" or id=""...
And I wonder why the online validator allow this in all cases.DOCUMENT
types.

Can someone give me a definitive link to any W3C document where I can
see this is Valid? I found only some sites where the consequence would
be this is not valid.

Peter

Apr 7 '07
16 5019
La*********@gma il.com wrote :
Hello,
I am little surprised about the following:
<a href="#" ...
You could search for the thread

Subject line: "Empty fragment identifier: <a href="#" ...>"
newsgroup: alt.html
Date posted on July 27th 2004 and replied on July 28th 2004.
I think Richard Formby's reply was best:

{
(...)
RFC1808, in section 2.2 defines in modified BNF form
"fragment = 1*pchar"
and mentions that the 1* means "[one] or more repetitions of the [pchar].

So, zero repetitions is not allowed and href="#" is therefore an error.

Since it is an error then the browser, as per the spec, is at liberty to
interperet it as the browser sees fit. There is no "correct" behaviour.
}

So, I too would recommend to stay away from href="#" and would
explicitly recommend to avoid using href="#" at all times.

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Apr 8 '07 #11
In our last episode,
<13************ *@corp.supernew s.com>,
the lovely and talented Gérard Talbot
broadcast on comp.infosystem s.www.authoring.html:
La*********@gma il.com wrote :
>Hello,
I am little surprised about the following:
<a href="#" ...
You could search for the thread
Subject line: "Empty fragment identifier: <a href="#" ...>"
newsgroup: alt.html
Date posted on July 27th 2004 and replied on July 28th 2004.
I think Richard Formby's reply was best:
{
(...)
RFC1808, in section 2.2 defines in modified BNF form
"fragment = 1*pchar"
and mentions that the 1* means "[one] or more repetitions of the [pchar].
RFC2396 supersedes RFC1808, and it states that a fragment is
*uric (i.e. 0 or more uric characters) [Section 4.1, RFC2396]. Clearly
the empty string (consisting of 0 uric) is valid, although as I have
written elsewhere, that does not mean that it is necessarily useful,
meaningful, etc. The interpretation of the fragment is up to the user
agent.
So, zero repetitions is not allowed and href="#" is therefore an error.
Since it is an error then the browser, as per the spec, is at liberty to
interperet it as the browser sees fit. There is no "correct" behaviour.
}
So, I too would recommend to stay away from href="#" and would
explicitly recommend to avoid using href="#" at all times.
Gérard
--
Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
Countdown: 653 days to go.
Chinese Terrorists:: Xuzhou Anying Biologic Technology Development Company Ltd.
Identified :: Wangdian Industrial Zone, Peixian, CN-32, China 221623
Apr 8 '07 #12
Scripsit Lars Eighner:
RFC2396 supersedes RFC1808,
and has itself been superseded. I wonder makes people keep babbling about
the issue, despite all the correct information having been given several
times in the past (in the midst of garbage as usual). The quote RFCs that
have been obsoleted many years ago (and misinterpret them).

Don't people even check RFC editor's database about the status of RFCs
before citing them??

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 8 '07 #13
Jukka K. Korpela wrote:
Scripsit Lars Eighner:
>RFC2396 supersedes RFC1808,

and has itself been superseded.
>
Don't people even check RFC editor's database about the status of RFCs
before citing them??
Well, this is cool. I was just wondering how anybody not actually
writing one of the RFCs would know which RFCs are current and which
obsoleted. And now I have an answer (for which, as is The Jukka Way, I
have had to make the actual effort myself).

I plugged the mystic phrase "RFC editor's database" into my nearest
search engine and out popped a list of databases which (purport to) list
current RFCs and the RFCs which replace them, their topic areas, etc.

For those even lazier than I am, http://www.rfc-editor.org/ is a place
to visit and treasure.

--
John
Apr 8 '07 #14
In our last episode,
<vW************ *******@reader1 .news.saunalaht i.fi>,
the lovely and talented Jukka K. Korpela
broadcast on comp.infosystem s.www.authoring.html:
Scripsit Lars Eighner:
>RFC2396 supersedes RFC1808,
and has itself been superseded.
The current 4.01 Spec cites RFC2396. nks for letting me know that
w3.org is full of shit as usual.
I wonder makes people keep babbling about
the issue,
Why does w3 cite an obsolete RFC?
despite all the correct information having been given several
times in the past (in the midst of garbage as usual).
The garbage as usual is right here:

Linkname: HTML 4 Specification References
URL: <http://www.w3.org/TR/html401/references.html #ref-URI>
The quote RFCs that
have been obsoleted many years ago (and misinterpret them).
Yup, I guess that is what W3 is all about.
Don't people even check RFC editor's database about the status of RFCs
before citing them??
It is W3C that did it. And as usual, relying on the current version of
a W3 spec is inviting a knife in the back.

--
Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
Countdown: 653 days to go.
Chinese Terrorists:: Xuzhou Anying Biologic Technology Development Company Ltd.
Identified :: Wangdian Industrial Zone, Peixian, CN-32, China 221623
Apr 8 '07 #15
Sun, 8 Apr 2007 14:00:36 +0300 from Jukka K. Korpela
<jk******@cs.tu t.fi>:
Don't people even check RFC editor's database about the status of RFCs
before citing them??
Until this moment, I didn't know one existed. URL?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Apr 8 '07 #16
Gérard Talbot <ne***********@ gtalbot.orgwrit es:
I think Richard Formby's reply was best:
RFC1808, in section 2.2 defines in modified BNF form
"fragment = 1*pchar"
and mentions that the 1* means "[one] or more repetitions of the [pchar].
His reply was certainly best in the sense of entertainment, since it
provides room for speculation whether it was malicious, humorous or just
careless; citing an RFC is much like citing Don Quixote, you can usually
get away with whatever you make up on the spot, because nobody has read
it or even cares to look up particulars when mentioned.
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
Apr 10 '07 #17

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

Similar topics

4
26438
by: Matthias Hildebrand | last post by:
Hello, std::map< int, MyClass*> mymap; it = mymap.find( somekey ) // here happen bad things if( it != mymap.end() ) { // do something useful with it->second } else
13
3407
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to <foo/>) From XHTML specification:
18
2482
by: Neal | last post by:
According to the specs (http://www.w3.org/TR/html401/struct/links.html#h-12.2), the <a> element requires an end tag. And so, when we use <A NAME="foo"> in HTML 2.0 to 4.01, it won't validate, it'll want to find the </A> tag. However, when I write a document containing, say, <a name="foo" /> it validates in XHTML 1.0. I'm obviously missing something here, as this confuses me somewhat. Does the magical / make the empty a element valid?...
2
1626
by: mlv2312 | last post by:
Hi, I have experienced problems when dealing with nested anchors. I implemented some code to perform highlighting and specific anchors are used for the searched words. The problem is when the searched words are inside <a href> tags, the links are lost after putting my anchors. For example: <a class="Programa" href="#" OnClick="window.open('/something.tif');"
1
2034
by: mlv2312 | last post by:
Hi, I have experienced problems when dealing with nested anchors. I implemented some code to perform highlighting and specific anchors are used for the searched words. The problem is when the searched words are inside <a href> tags, the links are lost after putting my anchors. For example: <a class="Programa" href="#" OnClick="window.open('/something.tif');"
3
6359
by: Clark Spencer | last post by:
I have built a small integration app using VS .NET 2003 that extracts orderinformation from a 'webshop'. Extracting the orderinformation works fine. Appending the order elements in the XmlDocument was also done in a jiffy. The final step is to save the document to disk and then ship it to another system using ftp. The xml orderfile produced must fit a set specification of the recieving system. That specification states that empty elements...
3
16564
by: windandwaves | last post by:
does it matter if I write var anchors = document.getElementsByTagName("A"); or var anchors = document.getElementsByTagName("a"); Or is there a better way to catch both <a hrefs and <A HREFS
3
2108
by: August Karlstrom | last post by:
Hi everyone, In XHTML, can any empty element <foo></foobe replaced by <foo />? Example: <table> <tr><td>1</td><td>2</td></tr> <tr><td /><td>4</td></tr> </table>
3
1949
by: harv3yb1rdman | last post by:
Hi, I have a blog which people often include a link in their comment. Can anyone point me to a script or demonstrate how I can automatically surround the text links with an anchor when the page is rendered? As an example, here is a typical comment: Hi! Great pics - have you seen this one? http://warehouse.carlh.com/comic/comic_062.php
0
9718
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
10613
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
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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
7649
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
6876
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
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3846
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.