Div tag

Discussion in 'HTML & Website Design' started by notbob1986, Mar 28, 2006.

  1. #1
    I had come across some information about a div tag recently where you could put a link on a website that could not be viewed by a surfer, but a search engine bot would be able to read and follow the tag.

    The idea was to place a link to a sitemap on a website so that it made it easier for spiders to follow.

    For the likes of me, I can't find the code for this div tag and was wondering if anyone had something I could use.

    Thank you
     
    notbob1986, Mar 28, 2006 IP
  2. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could use a css rule for the relevant div - visibility: hidden - that would hide it in a browser that supports css (pretty much all do now), and since search engines do not load css, they will see it.

    i.e.

    your page code..
    <div class="browserhide">Link goes here</div>
    Code (markup):
    and your css..
    .browserhide { visibility: hidden; }
    Code (markup):
    :)
     
    Tam, Mar 29, 2006 IP
  3. mariush

    mariush Peon

    Messages:
    562
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is reported that the new Googlebot checks for CSS's so you should be careful. Anyways, the bot will probably not penalize you for using just one hidden div.
     
    mariush, Mar 29, 2006 IP
  4. 87654321

    87654321 Well-Known Member

    Messages:
    317
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #4
    c'mon...that's kinda unethical
     
    87654321, Mar 29, 2006 IP
  5. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I see what you are trying to suggest, but its a very common and useful feature of CSS.

    And let's take csszengarden.com as an example, it is absolutely rife with visibility: hidden or display: none declarations, in fact I really doubt that you could find a site with more of them, and they hold atop position for the search term "CSS".
     
    Tam, Mar 29, 2006 IP
  6. 87654321

    87654321 Well-Known Member

    Messages:
    317
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #6
    I can't see any of those visibility: hidden in csszengarden! Can u tell me where u see it? :confused:
     
    87654321, Mar 30, 2006 IP
  7. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You'll find either visibility: hidden or display: none (I am fully confident that either method is employed repeatedly), they do the same thing and you can spend all day finding them in the css files if you like (there's a link to the css file on each page). You do the work :)

    attn OP: flippancy is sometimes productive ~ you should really use display: none ~ previous post edited accordingly.

    :)
     
    Tam, Mar 30, 2006 IP
  8. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    In fact it would be appropriate to describe the differences.

    display: none will show nothing and layout is not affected ~ http://www.w3.org/TR/CSS21/visuren.html#propdef-display

    visibility: hidden will show nothing, but layout is still affected ~ http://www.w3.org/TR/CSS21/visufx.html#visibility

    Its up to you to determine what suits your layout best, but if its applied to let's say a single line of links, the second option - visibility: hidden does indeed leave a blank space where the item is hidden, whereas display: none does not and subsequent links move into its place nicely.

    Apologies for not pointing this out at first.

    :)
     
    Tam, Mar 30, 2006 IP
  9. 87654321

    87654321 Well-Known Member

    Messages:
    317
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #9
    in the CSS of http://www.csszengarden.com i could only find 5 mentions of the display: none attribute and no mention of the visibility:hidden attribute. Also, these display:none tags were used just for replacing the images that they used.

    I think that CSSZenGarden ranks so high because of its backlinks. the number one site for 'CSS' is www.w3.org/Style/CSS/ and it has 30,900 backlinks and a PR9.

    CSSZenGArden has 10,100 backlinks and PR8. they are not trying to hide content and get good rankings. they are just using the display:none to replace the images. (if the image says CSSZenGarden, then, the <h1>/<h2> text also reads CSSZenGarden.)
     
    87654321, Mar 30, 2006 IP
  10. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm not sure how many, or which, of the css files you checked potnuru, but I found 6 in the home page style sheet alone and there are many other style sheets being used to show the various designs of the same page.

    I guess the point is that if you say using just one of these declarations is unethical, imagine how using 6 in a style sheet would be, not to mention using many style sheets in the same site with more than one in.

    I think you'll find that google doesn't parse your external style sheet to determine if there are any 'unethical' declarations like this. Both of those declarations are valid css and are in wide use in design. I'm not sure what your argument is here, and splitting hairs is counter productive.
     
    Tam, Mar 31, 2006 IP
  11. brian394

    brian394 Well-Known Member

    Messages:
    226
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    108
    #11
    You could also do it in-line as well...
    
    <a href="http://www.test.com" style="display: none;">test link</a>
    
    Code (markup):
    But it would probably be more apparent to Google that way :rolleyes:
     
    brian394, Apr 10, 2006 IP
  12. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #12
    Site maps are a strong usability feature. It is a Good Thing® to link to the site map so that visitors may rapidly find pages that might otherwise be difficult or counter-intuitive to reach. The site map is especially helpful for folks using text browsers, assistive technology, cell/PDA connections or power users.

    The 'standard' or expected position for the link is in the top right corner of the page. A secondary link in the footer is common.

    That you want to hide it makes one wonder, why would you?

    cheers,

    gary
     
    kk5st, Apr 10, 2006 IP