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 CSS Foundations Advanced Selectors Substring Matching Attribute Selectors

Kevin Naegele
Kevin Naegele
10,868 Points

substring matching attribute selectors quiz HELP

I have been trying to finsh this quiz and will never forget how to type substring matching attribute. I have copy and pasted from notes, retyped and not sure what i am missing ie: [att^="val"] or a[att^="val"]

6 Answers

Jessica Barnett
Jessica Barnett
8,028 Points

Try just the * , $ , and ^ by themselves. I think that might do it. : )

Kevin Naegele
Kevin Naegele
10,868 Points

And it is Jessica for the WIN! thanks

Jessica Barnett
Jessica Barnett
8,028 Points

How is the question/challenge worded? Which one are you stuck on?

Kevin Naegele
Kevin Naegele
10,868 Points

all wrong

The ___________ character is used to select an element whose attribute value contains at least one instance of the specified substring.

I put [att*="val"]

The _______ character is used to select an element whose attribute value ends with the specified substring.

[att$="val"]

The _____ character is used to select an element whose attribute value begins with the specified substring.

[att^="val"]

Kevin Naegele
Kevin Naegele
10,868 Points

I get all the multiple choice correct but not the type in questions

The $ character is used to select an element whose attribute value ends with the specified substring.character is used to select an element whose attribute value ends with the specified substring.

Anya Coleman
Anya Coleman
2,995 Points

The * character is used to select an element whose attribute value contains at least one instance of the specified substring.

The $ character is used to select an element whose attribute value ends with the specified substring.

The ^ character is used to select an element whose attribute value begins with the specified substring.