<a name=foo> close?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leif K-Brooks

    #16
    Re: &lt;a name=foo&gt; close?

    Mason A. Clark wrote:[color=blue]
    > But the W3C site says:
    >
    > "However, browser support for ID link destinations is very poor, so A NAME will
    > be needed for quite awhile. "[/color]

    Really? Where does the W3C say that?

    Comment

    • David Ross

      #17
      Re: &lt;a name=foo&gt; close?

      "Mason A. Clark" wrote:[color=blue]
      >
      > 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[/color]

      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/>.

      Comment

      • Mason A. Clark

        #18
        Re: &lt;a name=foo&gt; close?

        On Fri, 8 Jul 2005 10:49:20 +0200, Els <els.aNOSPAM@ti scali.nl> wrote:
        [color=blue]
        >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.[/color]

        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

        Comment

        • Mason A. Clark

          #19
          Re: &lt;a name=foo&gt; close?

          On Fri, 08 Jul 2005 10:51:35 -0700, David Ross <nobody@nowhere .not> wrote:
          [color=blue]
          >"Mason A. Clark" wrote:[color=green]
          >>
          >> 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[/color]
          >
          >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>[/color]

          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

          [color=blue]
          >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.[/color]

          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> )

          Comment

          • Darin McGrew

            #20
            Re: &lt;a name=foo&gt; close?

            David Ross <nobody@nowhere .not> wrote:[color=blue][color=green]
            >> When I use the NAME attribute, I use a blank content:
            >> <a name="foo"> </a>[/color][/color]

            Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:[color=blue]
            > Opera does *not* recognize this. I tested it just now.[/color]

            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, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
            Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

            "Nice is different than good." - Sondheim (LRRH, "Into the Woods")

            Comment

            • Mason A. Clark

              #21
              Re: &lt;a name=foo&gt; close?

              On Fri, 8 Jul 2005 20:34:50 +0000 (UTC), Darin McGrew
              <mcgrew@stanfor dalumni.org> wrote:
              [color=blue]
              >David Ross <nobody@nowhere .not> wrote:[color=green][color=darkred]
              >>> When I use the NAME attribute, I use a blank content:
              >>> <a name="foo"> </a>[/color][/color]
              >
              >Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:[color=green]
              >> Opera does *not* recognize this. I tested it just now.[/color]
              >
              >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?[/color]

              See Els post 7/8/2005 2:43 AM Els found a special situation
              in my demo url and opined it was a bug in Opera.

              The demo is sitting at:



              It has <a name="top"></a> and <a href="#top"> and
              does not work. Look for href near the bottom and
              <a name right below <body

              In view of this experience I would not depend on Opera 8.01 to
              find an empty <a name="foo"> </a> (spaces don't count)

              I'm using <a name="foo">&nbs p;</a> until I find something better.

              Mason C why does no one believe in me?

              =========the end===fini====c aput====

              Comment

              • Darin McGrew

                #22
                Re: &lt;a name=foo&gt; close?

                I wrote:[color=blue][color=green]
                >> 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?[/color][/color]

                Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:[color=blue]
                > The demo is sitting at:
                >
                > http://masonc.home.netcom.com/1template-1.html[/color]

                It's an interaction between the link to the named anchor and your use of
                "POSITION: fixed" in your style sheet. The problem goes away when I comment
                out that property.

                Actually, even with that property, Opera tries to do something; the page
                scrolls up a few pixels each time I click on the "Return to the top of this
                page" link.

                Of course, I find "Return to the top of this page" links amusingly
                pointless anyway, but that's another discussion.
                --
                Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                "Good teachers are costly. Bad teachers cost more." - Bob Talbert

                Comment

                • Mason A. Clark

                  #23
                  Re: &lt;a name=foo&gt; close?

                  On Sat, 9 Jul 2005 07:19:46 +0000 (UTC), Darin McGrew
                  <mcgrew@stanfor dalumni.org> wrote:[color=blue]
                  >
                  >Of course, I find "Return to the top of this page" links amusingly
                  >pointless anyway, but that's another discussion.[/color]

                  I've been accused of trolling. Isn't this a troll?

                  If a page must be scrolled. Surely an easy flip to the top is a
                  convenience to the viewer.

                  Mason C but..... enough of this thread it's done !

                  Comment

                  • Jukka K. Korpela

                    #24
                    Re: &lt;a name=foo&gt; close?

                    Mason A. Clark <masoncERASETHI S@ix.netcom.com > wrote:
                    [color=blue]
                    > On Sat, 9 Jul 2005 07:19:46 +0000 (UTC), Darin McGrew
                    > <mcgrew@stanfor dalumni.org> wrote:[color=green]
                    >>
                    >>Of course, I find "Return to the top of this page" links amusingly
                    >>pointless anyway, but that's another discussion.[/color]
                    >
                    > I've been accused of trolling. Isn't this a troll?[/color]

                    Depends on what "this" refers to.
                    [color=blue]
                    > If a page must be scrolled. Surely an easy flip to the top is a
                    > convenience to the viewer.[/color]

                    Do you mean that you find it more comfortable to scroll down to a
                    "Return to the top of this page", carefully position the pointer over
                    it and click on it than to press the keyboard key "Home", for example?

                    Did you even print a page containing "Return to the top of this page"
                    links and think how manifestly foolish they look like on paper?
                    [color=blue]
                    > Mason C but..... enough of this thread it's done ![/color]

                    Who died and made you the czar of Usenet?

                    --
                    Yucca, http://www.cs.tut.fi/~jkorpela/
                    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

                    Comment

                    • Darin McGrew

                      #25
                      Re: &lt;a name=foo&gt; close?

                      I wrote:[color=blue][color=green]
                      >> Of course, I find "Return to the top of this page" links amusingly
                      >> pointless anyway, but that's another discussion.[/color][/color]

                      Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:[color=blue]
                      > If a page must be scrolled. Surely an easy flip to the top is a
                      > convenience to the viewer.[/color]

                      Absolutely. And every browser I've used has had at least one built-in
                      mechanism for returning to the top of the current page quickly. There's no
                      need for such links on web pages.

                      Of course, browsers also have built-in mechanisms for navigating the
                      browser history (forward, back, etc.), printing pages, bookmarking pages,
                      opening links in new windows, closing windows, setting font sizes, etc.
                      --
                      Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                      Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                      "Good teachers are costly. Bad teachers cost more." - Bob Talbert

                      Comment

                      • Steve Pugh

                        #26
                        Re: &lt;a name=foo&gt; close?

                        Mason A. Clark <masoncERASETHI S@ix.netcom.com > wrote:
                        [color=blue]
                        >On Sat, 9 Jul 2005 07:19:46 +0000 (UTC), Darin McGrew
                        ><mcgrew@stanfo rdalumni.org> wrote:[color=green]
                        >>
                        >>Of course, I find "Return to the top of this page" links amusingly
                        >>pointless anyway, but that's another discussion.[/color]
                        >
                        >I've been accused of trolling. Isn't this a troll?
                        >
                        >If a page must be scrolled. Surely an easy flip to the top is a
                        >convenience to the viewer.[/color]

                        Yes, that's why the user has the Home key on their keyboard. It
                        returns them to the top of the page on every single page. Compare with
                        links that may or may not have been included on particular pages and
                        which if they are included will be in different places and styled
                        differently on every page. So which is easier for the user?

                        Steve

                        --
                        "My theories appal you, my heresies outrage you,
                        I never answer letters and you don't like my tie." - The Doctor

                        Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

                        Comment

                        • Thomas Dowling

                          #27
                          Re: &lt;a name=foo&gt; close?

                          Els <els.aNOSPAM@ti scali.nl> wrote in
                          news:84v54bry5v kh.1nnl8wb24btd b.dlg@40tude.ne t:
                          [color=blue]
                          > Mason A. Clark wrote:[color=green]
                          >> <H2 id="fooname" .. has been suggested.
                          >>
                          >> But the W3C site says:
                          >>
                          >> "However, browser support for ID link destinations is very poor,
                          >> so A NAME will be needed for quite awhile. "
                          >>[/color][/color]
                          [color=blue]
                          > Can't say I've found a user agent yet that fails to find <a
                          > id="foo" name="foo"></a>. Anyone know which one would fail that?[/color]

                          IIRC, Netscape 4. I didn't find the quoted page at W3C, but a similar
                          page at <http://www.htmlhelp.co m/reference/html40/special/a.html> is
                          dated from 1998, when NS4's various incompetencies would have merited a
                          warning like this.

                          --
                          Thomas Dowling
                          Ohio Library and Information Network

                          Comment

                          • Mason A. Clark

                            #28
                            Re: &lt;a name=foo&gt; close?

                            On Sat, 09 Jul 2005 08:05:41 GMT, Mason A. Clark <masoncERASETHI S@ix.netcom.com >
                            wrote:
                            [color=blue]
                            >On Sat, 9 Jul 2005 07:19:46 +0000 (UTC), Darin McGrew
                            ><mcgrew@stanfo rdalumni.org> wrote:[color=green]
                            >>
                            >>Of course, I find "Return to the top of this page" links amusingly
                            >>pointless anyway, but that's another discussion.[/color]
                            >
                            >I've been accused of trolling. Isn't this a troll?
                            >
                            >If a page must be scrolled. Surely an easy flip to the top is a
                            >convenience to the viewer.
                            >
                            > Mason C but..... enough of this thread it's done ![/color]

                            In the *real world* there are users who do not know their
                            keys will do something -- home for example.

                            And users like me whose lazy hand rests on the mouse.

                            btw, why would one have a css allowing printing of
                            useless stuff on paper?

                            Start your own thread. This is mine. End it.

                            Mason C usenet czar, pompous ass, stuffed shirt

                            Comment

                            • Dave Anderson

                              #29
                              Re: &lt;a name=foo&gt; close?

                              Mason A. Clark wrote:[color=blue]
                              > On Sat, 09 Jul 2005 08:05:41 GMT, Mason A. Clark <masoncERASETHI S@ix.netcom.com >
                              > wrote:
                              >
                              > In the *real world* there are users who do not know their
                              > keys will do something -- home for example.[/color]

                              Except in rather unusual circumstances, it's *their* responsibility to
                              learn how to use their chosen browser.
                              [color=blue]
                              > And users like me whose lazy hand rests on the mouse.[/color]

                              "Improving the experience" for the clueless or lazy at the expense of
                              degrading it for those who've achieved at least minimal competence is
                              almost always a bad idea.
                              [color=blue]
                              > Start your own thread. This is mine. End it.
                              >
                              > Mason C usenet czar, pompous ass, stuffed shirt[/color]

                              Well, two out of three ain't bad...

                              Dave

                              Comment

                              • Darin McGrew

                                #30
                                Re: &lt;a name=foo&gt; close?

                                I wrote:[color=blue][color=green][color=darkred]
                                >>> Of course, I find "Return to the top of this page" links amusingly
                                >>> pointless anyway, but that's another discussion.[/color][/color][/color]

                                Mason A. Clark <masoncNOT@THIS ix.netcom.comQQ Q> wrote:[color=blue]
                                > In the *real world* there are users who do not know their
                                > keys will do something -- home for example.
                                >
                                > And users like me whose lazy hand rests on the mouse.[/color]

                                The browsers I'm familiar with have mouse-based ways to get to the top of
                                the page quickly, too.

                                The built-in mechanisms of the browser work reliably on every page. Web
                                authors' attempts to replicate browser functionality are less reliable.
                                And users who don't know how to use basic functions of their browsers will
                                only be confused when various pages imitate those functions inconsistently.
                                [color=blue]
                                > Start your own thread. This is mine. End it.[/color]

                                What makes you think that the original poster owns the thread? What makes
                                you think that anyone owns a thread? If you're tired of it, then stop
                                reading it. Killfiles are your friend.
                                --
                                Darin McGrew, mcgrew@stanford alumni.org, http://www.rahul.net/mcgrew/
                                Web Design Group, darin@htmlhelp. com, http://www.HTMLHelp.com/

                                "Shin: a device for finding furniture in the dark." - Steven Wright

                                Comment

                                Working...