🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • yaakov
    yaakov
    2,381 Points

    It doesn't work in my app.js file but works in console. Why?

    Posted June 9, 2021 10:27am by yaakov
    yaakov
    2,381 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Travis Sly
    Travis Sly
    3,947 Points

    error 404

    Posted February 27, 2021 2:45pm by Travis Sly
    Travis Sly
    3,947 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    0 Answers

  • Karl Russell Sumando Menil
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Karl Russell Sumando Menil
    Full Stack JavaScript Techdegree Student 4,004 Points

    did not turn purple

    Posted February 10, 2021 12:05am by Karl Russell Sumando Menil
    .a{fill-rule:evenodd;}techdegree
    Karl Russell Sumando Menil
    Full Stack JavaScript Techdegree Student 4,004 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Muaaz Matwadia
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Muaaz Matwadia
    Full Stack JavaScript Techdegree Graduate 19,327 Points

    Not working like video

    Posted January 12, 2021 9:23am by Muaaz Matwadia
    .a{fill-rule:evenodd;}techdegree seal-36
    Muaaz Matwadia
    Full Stack JavaScript Techdegree Graduate 19,327 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Steve Seebart
    PLUS
    Steve Seebart
    Courses Plus Student 11,897 Points

    Using const and var in coursework

    Posted January 31, 2020 11:40pm by Steve Seebart
    Steve Seebart
    Courses Plus Student 11,897 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    2 Answers

  • Winnie Kelley
    Winnie Kelley
    13,988 Points

    .addEventListener error after pressing button to change colour.

    Posted January 10, 2020 4:43pm by Winnie Kelley
    Winnie Kelley
    13,988 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Karan Sheth
    Karan Sheth
    2,431 Points

    Why use a for loop instead of selecting the entire tag list?

    Posted November 13, 2019 2:05pm by Karan Sheth
    Karan Sheth
    2,431 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    Does the console make permanent changes to html doc?

    Posted June 14, 2019 3:31pm by vamosrope14
    vamosrope14
    14,932 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    2 Answers

  • Doron Geyer
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Doron Geyer
    Full Stack JavaScript Techdegree Student 13,897 Points

    not working as shown in the video

    Posted May 20, 2019 8:09am by Doron Geyer
    .a{fill-rule:evenodd;}techdegree
    Doron Geyer
    Full Stack JavaScript Techdegree Student 13,897 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Nelson J
    Nelson J
    7,411 Points

    isn't selecting the li tag inside the ul tag, the same as selecting the elements inside an array, if so, why it loops?

    Posted May 15, 2019 1:45am by Nelson J
    Nelson J
    7,411 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • coryp2
    coryp2
    5,315 Points

    Why += instead of ++ to increment by 1

    Posted April 15, 2019 1:47am by coryp2
    coryp2
    5,315 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Richard Verbraak
    Richard Verbraak
    7,739 Points

    Why do we have to specify which elements to manipulate with the getElementsByTagName?

    Posted March 12, 2019 2:24pm by Richard Verbraak
    Richard Verbraak
    7,739 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    2 Answers

  • meghana Joshi
    meghana Joshi
    4,596 Points

    I tried to use the forEach method and it does not work

    Posted January 25, 2019 8:02pm by meghana Joshi
    meghana Joshi
    4,596 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • nick schubert
    nick schubert
    3,535 Points

    Could someone explain this for loop?

    Posted November 28, 2018 2:23pm by nick schubert
    nick schubert
    3,535 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    3 Answers

  • Emer Ní Chíobháin
    Emer Ní Chíobháin
    2,674 Points

    Confused about using '' in HTML and JS

    Posted August 16, 2018 7:24pm by Emer Ní Chíobháin
    Emer Ní Chíobháin
    2,674 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Kevin Ohlsson
    Kevin Ohlsson
    4,559 Points

    code not work

    Posted August 6, 2018 7:24pm by Kevin Ohlsson
    Kevin Ohlsson
    4,559 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Michael Ramirez
    Michael Ramirez
    3,029 Points

    Why is this code not working?

    Posted August 3, 2018 9:42pm by Michael Ramirez
    Michael Ramirez
    3,029 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • tal Shnitzer
    PLUS
    tal Shnitzer
    Courses Plus Student 5,242 Points

    the const "myParagraph" is not defined on my console

    Posted February 26, 2018 10:53am by tal Shnitzer
    tal Shnitzer
    Courses Plus Student 5,242 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    3 Answers

  • Randall Brownlee
    Randall Brownlee
    5,518 Points

    Code works in the console, but exact same code wont work when previewed through Workspace. Issue with browser?

    Posted February 13, 2018 3:58pm by Randall Brownlee
    Randall Brownlee
    5,518 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    6 Answers

  • Mahfuzur Rahman
    Mahfuzur Rahman
    3,204 Points

    for loop doesn't work

    Posted December 8, 2017 8:27pm by Mahfuzur Rahman
    Mahfuzur Rahman
    3,204 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    2 Answers

  • brendon hanson
    brendon hanson
    6,191 Points

    I don't quite understand the (.style.color) where do you get these words?

    Posted December 7, 2017 6:09pm by brendon hanson
    brendon hanson
    6,191 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    3 Answers

  • Michael Fazekas
    Michael Fazekas
    630 Points

    problem it wont turn purple?

    Posted December 1, 2017 6:15am by Michael Fazekas
    Michael Fazekas
    630 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Jonathan Aldas
    Jonathan Aldas
    2,421 Points

    It says document.gerElementsByTagNames is not a function

    Posted October 13, 2017 2:56am by Jonathan Aldas
    Jonathan Aldas
    2,421 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    2 Answers

  • Spencer Mendoza
    Spencer Mendoza
    6,978 Points

    My list won't turn purple? I'm not sure what I'm doing wrong.

    Posted August 24, 2017 3:34pm by Spencer Mendoza
    Spencer Mendoza
    6,978 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Daniel McFarlin
    Daniel McFarlin
    5,168 Points

    Won't Turn List Purple

    Posted August 4, 2017 9:00pm by Daniel McFarlin
    Daniel McFarlin
    5,168 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Tony Haslam
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Tony Haslam
    Front End Web Development Techdegree Student 19,207 Points

    Having issue when I starting a newline in my workspace.

    Posted July 31, 2017 5:24pm by Tony Haslam
    .a{fill-rule:evenodd;}techdegree
    Tony Haslam
    Front End Web Development Techdegree Student 19,207 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Ben Ahlander
    Ben Ahlander
    7,528 Points

    Uncaught ReferenceError: myList is not defined

    Posted July 14, 2017 9:54pm by Ben Ahlander
    Ben Ahlander
    7,528 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    1 Answer

  • Vic Mercier
    Vic Mercier
    3,276 Points

    getElementByTagName

    Posted June 7, 2017 10:57pm by Vic Mercier
    Vic Mercier
    3,276 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    3 Answers

  • Elise St Hilaire
    Elise St Hilaire
    13,358 Points

    Why do we have to use a for loop, instead of applying the style color to myList directly?

    Posted December 19, 2016 4:00pm by Elise St Hilaire
    Elise St Hilaire
    13,358 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Getting a Handle on the DOM
    • Select All Elements of a Particular Type

    5 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.