I want coding for h1 with hyperlink

Discussion in 'HTML & Website Design' started by fsmobilez, Oct 6, 2008.

  1. #1
    Hi

    i have searched on net for header h1 tag but i can find it for simple text which was like

    <h1>anything</h1>

    i want a h1 tag which is with hyperlink will u post the html code for it.

    and is this simple h1 coding ok.
     
    fsmobilez, Oct 6, 2008 IP
  2. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Err...

    <a href="whateveryouwant.com"><h1>Whatever</h1></a>

    I am pretty sure that is what you are asking.
     
    Marshton, Oct 6, 2008 IP
  3. fsmobilez

    fsmobilez Active Member

    Messages:
    449
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    78
    #3
    thanks a bunch for help.
     
    fsmobilez, Oct 6, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Err..

    Nope, the <a> should be inside the <h1>

    
    <h1>
       <a href="#">Link</a>
    </h1>
    
    Code (markup):
    <h1> Is a block level element and an <a> is an inline.

    Nick
     
    nicangeli, Oct 6, 2008 IP
  5. John Colin

    John Colin Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    another solution if you like to add many links with only of h1
    h1 { } in css
    <div class="h1"><a href="">anything</a></div> <--> reflects the h1 link
    <a href="">anything</a> <--> reflects the normal link
     
    John Colin, Oct 7, 2008 IP
  6. iTeachWeb.com

    iTeachWeb.com Active Member

    Messages:
    133
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #6
    That's correct
     
    iTeachWeb.com, Oct 7, 2008 IP