Results 1 to 4 of 4

Thread: Semantics

  1. #1
    Join Date
    Aug 2008
    Location
    Estados Unidos
    Posts
    26
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default Semantics

    I'm doing a menu for a restaurant and needed some PHP help earlier. Twey the moderator of the forum brought to my attention that it would be more proper to place my menu inside of a table.

    This is the format that I'm currently using.
    HTML Code:
    <h2 class ="menu-category">TAPAS FRIAS</h2>
     <dl>
      <dt>Ensalada de Pollo</dt>
        <dd class ="price">$5.95</dd>
        <dd class ="ingredients">Grilled chicken breast over mixed greens, tossed in a balsamic vinaigrette.</dd>
       <dt>Alcachofas Estofadas</dt>
         <dd class="price">$6.95</dd>
         <dd class ="ingredients">Braised artichokes with serrano ham, sweet pea salad, walnut dressing, and manchego cheese.</dd>
     <dl>
    My view was that the 2 <dd>s did indeed define the <dt> and was therefore the proper format.

    What's your opinion? Is a table the correct semantic approach?

    Thanks,
    Joe

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Whatever you like is generally fine as long as it doesn't cause any problems. However, tables are specifically for tabular data like a restaurant menu or price listings.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jeaux (08-18-2008)

  4. #3
    Join Date
    Aug 2008
    Location
    Estados Unidos
    Posts
    26
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default That sucks

    I went through a massive pain writing alternative style sheets for IE to get it just right, and it turns out I was barking up the wrong tree. A table would have been so much easier.

    Live and learn. I appreciate the patience and descriptiveness that the moderators here have. Twey went through a lot of trouble to help me.

    Sincerest thanks,
    Joe

  5. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The 'ingredients' <dd> is indeed a definition, but the 'price' isn't -- it's associated information, it doesn't describe the term. Note that semantically, a definition list is a subset of a table (it's basically tabular data).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. The Following User Says Thank You to Twey For This Useful Post:

    jeaux (08-18-2008)

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
  •