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

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,778 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.