homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Ideas on HTML5 Layout for FAQs
CSS_Kidd




msg:4150686
 6:05 pm on Jun 10, 2010 (gmt 0)

I am laying out a step by step FAQ page, but I wasn't sure if it would be more beneficial to use:

<article>
<header>
<h1>Question</h1>
</header>
<p>Answer</p>
</article>

for each question (something close to that) or just use an Ordered List. Each question/answer subject is able to independently be its own article and should be presented semantically. What do you think?

 

Fotiman




msg:4150711
 6:44 pm on Jun 10, 2010 (gmt 0)

Perhaps, then, you have a list of articles?
<ul>
<li>
<article>
<header>
<h1>Question</h1>
</header>
<p>Answer</p>
</article>
</li>
<li>
<article>
<header>
<h1>Question</h1>
</header>
<p>Answer</p>
</article>
</li>
</ul>

CSS_Kidd




msg:4150719
 7:06 pm on Jun 10, 2010 (gmt 0)

@Fotiman
Is there a benefit to that? It seems a little redundant. If it would be used for styling, wouldn't I just give the articles a class and style the H1 and P as the articles children? i.e.:

<article class="article">
<h1>Question</h1>
<p>Answer</p>
<article>

CSS:
.article {
style
}
.article h1 {
style
}
.article p {
style
}

I am not sure I understand the reasoning to having articles in a list. Please explain.

Fotiman




msg:4150746
 8:03 pm on Jun 10, 2010 (gmt 0)

Well, I was only talking semantically. You had mentioned that they could be placed in a list. :) Realistically, though, I would not envision having "lists of articles". If each Q/A can be considered an article, then I suppose it makes sense to use <article>.

bill




msg:4150882
 12:50 am on Jun 11, 2010 (gmt 0)

What about using a definition list for this?

<dl>
<dt>Question 1</dt>
<dd>Answer 1</dd>
<dt>Question 2</dt>
<dd>Answer 2</dd>
</dl>


HTML5 even has a new <dialog> tag that uses <dt> and <dl> tags.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved