Results 1 to 2 of 2

Thread: LINK element and navigation

  1. #1
    Join Date
    May 2005
    Location
    newcastle, australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default LINK element and navigation

    hi everyone,

    hopefully this'll be a quickie:

    in the head section of my html file, i have:

    Code:
    	<link hreflang="en" rel="prev" title="page03" href="./page03.htm">
    	<link hreflang="en" rel="next" title="page05" href="./page05.htm">
    and then later in the body i have:

    Code:
    	<a href="./page03.htm" title="page03">	PREV</a> | 
    	<a href="./menu.htm">			MENU</a> | 
    	<a href="./page05.htm" title="page05">	NEXT</a>
    can i use any attribute in the link elements to reference to
    the href in the link element from the anchor element?

    that is, use the information in the link element to draw on
    from the anchor element...

    meaning, to pair:

    Code:
    	<link hreflang="en" rel="prev" title="page03" href="./page03.htm">
    	...
    	<a href="#prev" title="page03">	PREV</a> |
    so that i can avoid re-writing the uri twice in the same page?
    making it also easy to update the uri in only one place if it changes.

    http://www.w3c.org does say:

    Links specified by LINK are not rendered with the document's
    contents, although user agents may render them in other ways
    (e.g., as navigation tools).
    but i haven't found anywhere in the documentation on HOW to do it
    specifically in a VISUAL browser (via developer, not user agent).

    i'd /prefer/ not to use javascript if possible, even css if it can be avoided.
    i want these links to work even when ppl have javascript turned off and css
    overridden. just pure and simple HTML (can be transitional). hence prefer. Css is o.k., i suppose i expect most ppl will use the website's css.

    if there's no way around it, then i'll have to do the hard slog and
    put it all in manually as hard code with html. one would think, though that
    the link element would lend itself very nicely to this sort of behaviour.

    the intention is to have a non-frames friendly site.

    thanks in advance.
    wiklendt.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    can i use any attribute in the link elements to reference to
    the href in the link element from the anchor element?
    No.
    The <link> element and the <a> element have absolutely nothing to do with one another. The only suitable way to do what you ask is with a server-side language.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •