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

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

HTML Forum

    
Labeling Lists
ocon




msg:4445391
 4:07 pm on Apr 25, 2012 (gmt 0)

I'm trying to use proper markup with my code. Currently I have a list of different fruits with a header:

<h2>Fruit</h2>
<ul>
<li>Apple</li>
<li>Lemon</li>
<li>Watermelon</li>
</ul>


I was looking if there was a more appropriate way to label my lists, and I came across a label header:

<ul>
<lh>Fruit</lh>
<li>Apple</li>
<li>Lemon</li>
<li>Watermelon</li>
</ul>


Unfortunately the label header is no longer valid. Is it appropriate to use a definition list (it seems some people use it this way, but it troubles me because an "apple" is not the definition of a "fruit"), or is the way I am currently doing it the best method?

<dl>
<dt>Fruit</dt>
<dd>Apple</dd>
<dd>Lemon</dd>
<dd>Watermelon</dd>
</dl>

 

CoursesWeb




msg:4453082
 5:48 am on May 14, 2012 (gmt 0)

Hi,
From what i saw in the code of some CMS, they use <dl><dt><dd> for lists with specified header /label.
Or, another method:

<ul>
<li>Fruit
<ul>
<li>Apple</li>
<li>Lemon</li>
<li>Watermelon</li>
</ul>
</li></ul>

But maybe that isn't so important if you create the page as you want.

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