WEB header img and H1 tag

Discussion in 'OT Technology' started by autox, Sep 20, 2007.

  1. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    Im retarded when it comes to coding, whats the proper way to do this:
    <div id="header">
    <a href="http://www.freestufftimes.com"><h1><img src='http://www.freestufftimes.com/newtop.gif' alt='Free Stuff Times'border="0"></h1></a>
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,924
    Likes Received:
    11
    Location:
    Los Angeles
    <h1><a><img /></a></h1>

    I personally would put the image in a div of it's own. I use h1 specifically as a text modifier for headlines.
     
  3. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
  4. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    hmm, this is what my header shit looks like:
    #header {
    background: #FFFFFF;
    width: 960px;
    margin: 0px auto 0px;
    padding: 10px 0px 10px 0px;
    text-align: left;
    border-top: 5px solid #658DB5;
    text-transform: uppercase;
    }

    #header a, #header h1 {
    font-family: Times New Roman, Helvetica, Sans-Serif;
    font-size: 48px;
    color: #333333;
    text-decoration: none;
    padding: 0px 10px 0px 10px;
    margin: 0px;
    text-transform: uppercase;
    }

    #header a:hover{
    color: #333333;
    }

    #header h1
    {
    font-weight:normal;
    }
     
  5. wait what exactly are you trying to do? and why are you putting an image link within an h1 tag?

    for hovers, you should be adding the a:link and a:hover as it's own set, rather than adding them to heading. i didn't even know you could do that.
     
  6. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Came here to post this.
     
  7. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    Im trying to have the header image clickable as the homepage link, and the title as an H1 tag
     
  8. is the text in the image already? because you have the img link inside of the h1 tag and no text in that first code you posted :dunno:
     
  9. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    I think i had assumed that it picked up the alt tag. I rarely even touch any code :uh:
     
  10. oh you're talking about the alt tag? whatever is in the alt tag will not physically show on your HTML. all the alt tag is for is when you hover over an image, whatever text is in the "alt" tag will pop up. it's to stay compliant with handicap laws so most people who cannot read can use special programs that read the alt tags of images for them. it's always good to set your alt tags, but it won't physically show up on your html. hopefully that helps.
     
  11. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    yeah, I knew thats what the alt tag did, I just assumed it would show up
     
  12. oh no it won't show up.
     
  13. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    yea, dont put an image in <h1> tags. just use a div.
     
  14. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,924
    Likes Received:
    11
    Location:
    Los Angeles
    Honestly, what are you doing?
     
  15. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    I have no fucking clue, I was just messing around with a website optimizer and it said I didnt have any H1 tags :uh:
     
  16. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,924
    Likes Received:
    11
    Location:
    Los Angeles
    I don't see why you need any H1 tags if all you're doing is linking an image. Also, why are you changing the color of your anchor tag in the hover parameter if you're just linking an image? Does it have a border or something?

    Post the image, and post exactly what you want, and I'll try to help you.
     
  17. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    no thats just the way my wordpress theme was setup. It was originally text, but I made a header image instead. My stupid wordpress theme doesnt have any h1 tags anywhere so I figured having my title as an h1 tag wouldnt do anything but help search engine results
     
  18. auveeb

    auveeb DATS CUTE

    Joined:
    Mar 22, 2005
    Messages:
    11,467
    Likes Received:
    0
    Location:
    New York City, NY
    Having an image within h1 tags is retarded.
     

Share This Page