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

CSS Bootstrap 4 Basics (Retired) Using Bootstrap Components Using ScrollSpy to Highlight Nav Links

Explain the use of a period in the data-target element

I really believe you should have explained the use of periods (full stops in the UK) and hashes in the data-target element.

Specifically that an entry prefixed with period relates to a class and an entry prefixed with a hash relates to an id. Explaining why navbar needs to be prefixed by a period rather than just stating that it won't work if you omit it .. is missing a trick and not helping students learn how element target works.

Leigh Maher
Leigh Maher
21,830 Points

Hi Phil, the period is just indicating that your targeting a class name instead of an id name. If it was an id you would use # instead.

1 Answer

This class is intended for students who have ideally completed many other CSS courses. By now, understanding the difference between an ID and a Class should be second nature.