Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Using title attribute

    I was just pondering about the use of the title attibute for links in HTML and was seeing if there was a way of automating this process.. Say I have a link

    <a href=index.html" title="Home">Home page</a>


    If I have an HTML page with a shed load of links on it, it is just one of those extra little jobs to go around and add the title attribute to each one. Does anyone know of a method (preferably CSS) that can do this automatically along the lines of "if link to index, then add title="Home"?

    I was thinking of some kind of css hack using the pseudo class :after similar to a previous post of mine but it is not currently supported in non-gecko browsers...anybody got any thoughts?
    Jerry

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using title attribute

    I don't know of any creative hacks using standard HTML or CSS... is PHP or another server-side technology out of the question?
    -Mark

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using title attribute

    Could you use a creative "Find and Replace" feature of a text editor? Like - try replacing href="index.html" with href="index.htm" title="Home"

    You're talking about making these changes to a static page, right? This should work!

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Using title attribute

    I don't think you need a title attribute that duplicates the visible text of the link. Or is this a standards-compliance hoop that needs to be jumped through?

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Using title attribute

    Do you know those days when you ponder and wonder about a creative solution and then somebody comes up with an idea that is so simple to achieve, you think that it is too simple <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I suppose that is the solution for static pages, quick and decisive <img src=/S/yep.gif border=0 alt=yep width=15 height=15>

    Looking at this problem, I reckon that if it was possible then some website would have it, so possibly it is not possible yet.


    Mark (WyllyWylly) .... <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>PHP ain't my forte, it is like beards to me, can't stand it and have never touched it

    and Jeff....No it is not one of my compliance questions <img src=/S/grin.gif border=0 alt=grin width=15 height=15>, just a " Nice to know and I did it ' cos I can" questions <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

Posting Permissions

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