Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • Peter Huang
    Peter Huang
    5,427 Points

    Why do we use class="form-contact" instead of just simple class of " .form-contact " ?

    Posted November 6, 2022 8:46pm by Peter Huang
    Peter Huang
    5,427 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Quinton Shuman
    Quinton Shuman
    7,068 Points

    At 3:57 in Guil says "we may also see an attribute selector that's 'qualified' with an element type"

    Posted November 19, 2020 7:36pm by Quinton Shuman
    Quinton Shuman
    7,068 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Routine Poutine
    Routine Poutine
    26,050 Points

    Attribute selector changes automatically to class and id selectors?

    Posted June 13, 2019 7:08pm by Routine Poutine
    Routine Poutine
    26,050 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Karla Gallegos
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Karla Gallegos
    Front End Web Development Techdegree Student 5,357 Points

    #container . form-contact

    Posted April 19, 2019 7:32pm by Karla Gallegos
    .a{fill-rule:evenodd;}techdegree
    Karla Gallegos
    Front End Web Development Techdegree Student 5,357 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Anthony Vick
    Anthony Vick
    5,096 Points

    When using class="form-contact" the settings appear for an instant and then go back to being as if they weren't there.

    Posted January 27, 2019 7:23pm by Anthony Vick
    Anthony Vick
    5,096 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Matthew Francis
    Matthew Francis
    6,967 Points

    When to use Attribute selector vs a class?

    Posted November 19, 2018 1:51am by Matthew Francis
    Matthew Francis
    6,967 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Lia Sansoucy
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Lia Sansoucy
    UX Design Techdegree Graduate 16,070 Points

    For those using the CC for this video, and cannot hear the sound- note that it is not always accurate.

    Posted June 6, 2018 12:42pm by Lia Sansoucy
    .a{fill-rule:evenodd;}techdegree seal-36
    Lia Sansoucy
    UX Design Techdegree Graduate 16,070 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Dwi Andreas Prawiranegara
    Dwi Andreas Prawiranegara
    7,181 Points

    How do we make the placeholder "email@website.com" to be green in color?

    Posted April 1, 2018 2:37am by Dwi Andreas Prawiranegara
    Dwi Andreas Prawiranegara
    7,181 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Aakash Srivastav
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points

    submit and reset

    Posted January 11, 2018 5:23am by Aakash Srivastav
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Winston Quin
    Winston Quin
    10,359 Points

    I copied the code in my workspace, saved, and clicked preview in browser, but none of the CSS selectors did anything

    Posted September 20, 2017 7:08pm by Winston Quin
    Winston Quin
    10,359 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Andre Kucharzyk
    Andre Kucharzyk
    4,479 Points

    Why use [class = "form-contact"] {...}instead of .form-contact {...}

    Posted September 17, 2017 3:42pm by Andre Kucharzyk
    Andre Kucharzyk
    4,479 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Pawel Ellwart
    Pawel Ellwart
    12,993 Points

    Text overlaps to the content

    Posted July 23, 2017 1:56pm by Pawel Ellwart
    Pawel Ellwart
    12,993 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    3 Answers

  • Hamza Saleemi
    Hamza Saleemi
    4,257 Points

    Can't select the a element

    Posted July 16, 2017 11:28am by Hamza Saleemi
    Hamza Saleemi
    4,257 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Matthew Keys
    Matthew Keys
    1,922 Points

    Confused regarding "for" and "type" and stuff like that

    Posted March 21, 2017 7:24am by Matthew Keys
    Matthew Keys
    1,922 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Andrew Teece
    Andrew Teece
    4,885 Points

    'form' & 'div' needed before [ ]?

    Posted January 27, 2017 2:47pm by Andrew Teece
    Andrew Teece
    4,885 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • claudius mainja
    claudius mainja
    9,661 Points

    getting confused

    Posted November 9, 2016 2:17am by claudius mainja
    claudius mainja
    9,661 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    3 Answers

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    form [class="form-contact"] and [class="form-contact"] not working

    Posted July 27, 2016 6:57am by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Anna Burrell
    Anna Burrell
    1,898 Points

    Why doesn't my code turn the Class selectors' elements red?

    Posted June 27, 2016 8:38pm by Anna Burrell
    Anna Burrell
    1,898 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Reagen Rahardjo
    Reagen Rahardjo
    3,770 Points

    How to target attribute in one specific class?

    Posted June 5, 2016 6:06am by Reagen Rahardjo
    Reagen Rahardjo
    3,770 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Kiran Reddy
    PLUS
    Kiran Reddy
    Courses Plus Student 1,895 Points

    attribute doesn't change the color of email

    Posted May 4, 2016 11:53pm by Kiran Reddy
    Kiran Reddy
    Courses Plus Student 1,895 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Shadab Khan
    Shadab Khan
    5,470 Points

    Class selector targeting labels?

    Posted November 28, 2015 1:51am by Shadab Khan
    Shadab Khan
    5,470 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Zubair Siddique
    Zubair Siddique
    4,889 Points

    How come they went on quickly without explaining new selectors like #type or #placeholder ?

    Posted September 13, 2015 10:29am by Zubair Siddique
    Zubair Siddique
    4,889 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Alex Oates
    Alex Oates
    7,171 Points

    Targeting the "placeholder" type doesn't work, yet targeting "email" does. Why is this? Using Safari.

    Posted August 14, 2015 4:32pm by Alex Oates
    Alex Oates
    7,171 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Kim Gee
    Kim Gee
    3,841 Points

    [class] vs [id]

    Posted June 16, 2015 7:05pm by Kim Gee
    Kim Gee
    3,841 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Li Mbo
    Li Mbo
    5,096 Points

    what is the difference between div[id="name1"] and div #name1 ?

    Posted May 28, 2015 9:55pm by Li Mbo
    Li Mbo
    5,096 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    1 Answer

  • Richard Nicholls
    Richard Nicholls
    1,301 Points

    We are typing div[id="container"] to select the container. why cant we just use #container instead?

    Posted April 22, 2015 7:59pm by Richard Nicholls
    Richard Nicholls
    1,301 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    2 Answers

  • Richard Nicholls
    Richard Nicholls
    1,301 Points

    Workspace not loading

    Posted April 21, 2015 9:41pm by Richard Nicholls
    Richard Nicholls
    1,301 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    7 Answers

  • Jordan Hill
    Jordan Hill
    3,167 Points

    How come each video has its own workspace?

    Posted March 30, 2015 1:15pm by Jordan Hill
    Jordan Hill
    3,167 Points
    • CSS
    • CSS Selectors
    • Selectors - Beyond the Basics
    • Attribute Selectors

    5 Answers

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

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord