Grow your CSS skills. Land your dream job.

Which is the best logical and semantic solution to code Q&A

  • # March 10, 2009 at 2:58 am

    1.

    Quote:
    <h2/h3> question</h2/h3>
    <p>answer</p>

    2.

    Quote:
    <p class="bold">Question</p>
    <p>answer</p>

    3.

    Quote:
    <dl>
    <dt>Question</dt>
    <dd>Answer</dd>
    </dl>

    or anything else

    # March 10, 2009 at 3:46 am

    or <li>

    seriously it is totally up to you, whatever you feel is best to fit the design/css code

    # March 10, 2009 at 4:00 am

    We can fit anything . the question is now what we can fit?

    I wanted to know which method is semantically correct. What expert use?

    Rob
    # March 10, 2009 at 5:22 am

    Like Ikthius said – it depends on how your QA is layed out… there is no law written in stone for Q&A lists – its just what fits your design better.

    If it was actually a list the I would probably go for the DL option but I can see each of them working fine and depending on the situation all might do the job better than the other

    # March 10, 2009 at 1:50 pm

    here is one of mine:

    a FAQ for my martial arts club
    http://www.woskf.co.uk/faq.php

    # March 10, 2009 at 8:43 pm

    Semantically it is a list of FAQs so you should use a list structure. Whether it is an unordered, ordered or definition list is up to you.

    I do like your use of <dl> though :mrgreen:

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".