SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Non-Member
    Join Date
    Feb 2006
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best way to code directory categories?

    I am wondering what is the best way to code categories for a directory website such as botw.org? I see this site uses tables but I am wondering the best way to code something like this with css rather than tables.

    The main cats could be an h4 with the subcats being a paragraph and it would work but I dont think the code would represent the content.

    What seemingly makes the most sense to me is nested lists. With the nested list being displayed inline.

    What do the experts think?
    Last edited by cluelessphp; Aug 10, 2006 at 17:46.

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The container could be either a single list with the list items floated left or a series of three lists all floated left. Then, as you say, a heading and a list inside each containing list item.

  3. #3
    Non-Member
    Join Date
    Feb 2006
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But dont you think h tags should only be used as paragraph headings, since that is what they are for? Should the h tag be used to head an inline list? I am thinking not only for the sake of good code, but also from an seo standpoint. I could see a search engine looking at all those categories as headings and then see no content under them. Doesnt that look like spam to a bot?

    What about definition lists? From a code standpoint and an seo standpoint?

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A heading doesn't have to be a heading on a paragraph, it can be a heading on a list just as well. Why would a search engine see no content? A list is content, just the same as a paragraph is. I think a definition list is a less semantically correct option than an unordered list.

  5. #5
    Guru Meditation Error gnarly's Avatar
    Join Date
    Dec 2003
    Location
    Cheltenham, United Kingdom
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A heading is a heading is a heading. It's job is to act as a heading for whatever it precedes.

    Search engines can read all the text, regardless of what element it's held in (as long as it's not an image without an alt, or generated by javascript, or something silly like that).
    Olly Hodgson
    thinkdrastic.net


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •