Web Analytics Made Easy -
StatCounter Are hyperlinks always underlined? - CodingForum

Announcement

Collapse
No announcement yet.

Are hyperlinks always underlined?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        Thank you J&J.
        It's more simple than I expected

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              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.

              Comment


              • #8
                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.

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    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

                    Comment

                    Working...
                    X