Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Mark Dekin
Mark Dekin
26,839 Points

Wrapping in divs and using HTML5 elements for the Slick Plugin

So this is a 2 part question about the Slick Plugin:

  1. Will the slick plugin work when wrapping things in a Figure element (or any other HTML5 semantic element for that matter) or will it only work with divs?

  2. For the slick plugin, must everything be wrapped in divs or can a carousel gallery just have a containing element with multiple img elements without divs?

Joshua Eagle
Joshua Eagle
9,777 Points
  1. When you say "Will this plugin work..." What plugin? I assume you mean a carousel? Are you writing it? Or asking about an already created plugin?

  2. There are many ways to implement this, some people create them in an unordered list, others with divs, it's all up to you! Be smart about it, and understand the differences of each element that you choose to use. HTML5 allows you to use and configure just about any element you want, although it may not be semantically correct. If I were to do it, I would probably create them with Div's as they are already configured to be block elements, and the less css you use, and the less html you use, the better. :) I know this is a vague answer, but I need more clarity in the question that is being asked. In any event, I hope this helps. :)

Mark Dekin
Mark Dekin
26,839 Points

Sorry in the video it was about the slick plugin. I just edited the question so it is more clear.