Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Lists Definition Lists

Sharina V. Jones
Sharina V. Jones
11,459 Points

Attribute required for two title definitions?

In the video example, he uses the lang attribute to distinguish between the British and English versions of the word color. I just wanted to find out if an attribute will always be required for distinction in html5. I know it won't always be language but I just wanted to find out if an attribute for distinction is always required.

3 Answers

I couldn't find anything in the spec that would suggest it's required.

http://www.w3.org/TR/html5/grouping-content.html#the-dl-element

I would take a look at the examples that are posted for the dl, dt, and dd elements in that link.

The dd element has a vocabulary list example where you see some meaningful class names assigned to the dd's like class="pronunciation"

My take away from this is that it is up to you to impart as much meaning as you can to your content using various attributes.

Caroline Hagan
Caroline Hagan
12,612 Points

From what I could find, the lang attribute is the only attribute used for distinction, but I could be mistaken. Little bit of blurb about it on here... http://html5doctor.com/the-dl-element/

Sharina V. Jones
Sharina V. Jones
11,459 Points

Thanks all. I didn't think they would require an attribute but I wanted to be sure.