Html links?

by 5 replies
6
Hi

I want to make my <h2> text clickable but i dont want the underscore and i dont want it to change color either.
Is there anyway i can do this?

Thanks in advance
#website design #html #links
  • Banned
    [DELETED]
  • Code:
    <h2><a href="webpage.html" style="text-decoration:none;color:yourcolor">your h2 text </a></h2>
    should work
  • Using CSS stylesheets will give you that kind of control
    • [1] reply

    • it can, but he only wants the one link like that, so he would have to use div tags for it, which would add a few lines of code when it's not really needed.


      generally i would agree with using CSS for editing these sorts of things though.
      • [1] reply
  • He could just create a class that would be reused over and over. It is just one tag now, but as he develops he will want to use solid validated code so using a css stylesheet would be the preferred method.

    the XHTML would be something like:

    <h2><a href="your full domain name including http" class="nodec">Blah blah blah </a></h2>

    The CSS would be:

    .nodec {
    text-decoration: none;
    }



    This is a simple thing to do and will keep his site validated and easy to customize in the future.

    I do web design and development work! Let me know if you need any help!

    ~Rick

Next Topics on Trending Feed