Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Are hyperlinks always underlined?

    Hi,

    I would like to know if there is a way to avoid the underlining for a text-based hyperlink.
    There are circumstances where the underlining is disturbing, ugly and not necessary.

    Thanks,
    Richard

  • #2
    J&J
    J&J is offline
    New Coder
    Join Date
    Sep 2003
    Location
    your temp folder
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yup, underlines not necessary

    Yes, you can have link text without underlines or with other styles instead - like dotted lines, strike out text, overlines, over & under lines, etc. - although depending on the browser/version used to view such a web page, it may not be compatible with the styles applied.

    But anyways, to answer your question simply, you can use CSS within your HTML to make links without underlines:

    <a href="www.wherever.com" style="text-decoration: none">linked text here</a>


    Or if you use CSS, you can make one stylesheet apply to the entire page or the entire site... Which is much easier if you have tons of pages to update/code.
    ~ J&J ~
    "Sometimes I feel like I'm rearranging deck chairs on the Titanic."


    Work | Family | Community

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For accessibility reasons links should always be underlined, unless they come in an obvious context like a navigation bar.

    The point of underlining is so that you're indicating purpose without relying on color - if it's viewed by someone who can't distinguish your link color from regular text, then how else do they know what's a link?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #4
    New Coder
    Join Date
    Sep 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you J&J.
    It's more simple than I expected

  • #5
    New to the CF scene
    Join Date
    Feb 2004
    Location
    Austin, TX
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    u can use style sheets

    this code should work for you to remove the hyper links.

    <style type="text/css">
    <!--
    a:link {text-decoration: none}
    a:visited {text-decoration: none}
    a:active {text-decoration: none}
    a:hover {text-decoration: none}
    --></style>

    it will get rid of all decorations

  • #6
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: u can use style sheets

    Originally posted by justletme_fly
    this code should work for you to remove the hyper links.
    It seems to be a popular trend to have the text underline in the :hover state. Call it a happy medium between old and new.

    I take no responsibility for the above nonsense.


    Left Justified

  • #7
    New to the CF scene
    Join Date
    Feb 2004
    Location
    Austin, TX
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks, i never thought of it that way

    i never looked at it that way. i'll keep that in mind for future projects. thanks a lot.

  • #8
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: u can use style sheets

    Originally posted by justletme_fly
    this code should work for you to remove the hyper links.

    <style type="text/css">
    <!--
    a:link {text-decoration: none}
    a:visited {text-decoration: none}
    a:active {text-decoration: none}
    a:hover {text-decoration: none}
    --></style>

    it will get rid of all decorations
    and actually if you're going to do it that way you may as well just use:
    Code:
    a { text-decoration: none; }

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #9
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Re: u can use style sheets

    Originally posted by mindlessLemming
    It seems to be a popular trend to have the text underline in the :hover state. Call it a happy medium between old and new.
    It actually makes more sense to go the other way. People completely oblivious to colour would recognise the link as a link due to underlining, and when they hover over it, obviously it's still a link.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #10
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Re: Re: u can use style sheets

    Originally posted by me'
    It actually makes more sense to go the other way. People completely oblivious to colour would recognise the link as a link due to underlining, and when they hover over it, obviously it's still a link.
    Good point

    I take no responsibility for the above nonsense.


    Left Justified


  •  

    Posting Permissions

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