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 trialFabian Pijpers
Courses Plus Student 41,372 PointsWhen using the exact same syntax you use in the video's i get a null returned! Do you know why?
document.querySelector('[title=label]') it returned the: null
The above is what i entered into the developer console.
3 Answers
Adam Beer
11,314 PointsTry this Nathan,
document.getElementsByClassName("textDesign")
or
document.querySelector('[title="firstParagraph"]')
If it doesn't work please show your whole html/javascript code.
Martin Lecke
14,385 PointsHi
You have missed one step in the video if you are tagging along the code-along.
On the 02:03 minute mark he adds the title="label" on the html tag. You dont have it in your html else you might have misspelled it. Check the video at 02.03
nathan goel
7,410 PointsSame kind of issue for me. Here is my code in the html page: <p title="firstParagraph" class="textDesign"> Lorem ipsum dolor sit amet, consectetur adip... </p>
That is the result in the console:
document.querySelector('[title=firstParagraph]') null
Help, please!!
Adam Beer
11,314 PointsAdam Beer
11,314 PointsPlease show your code.