🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Locators: all 10 questions

Quiz: Locators · Question 7 of 10

Which CSS selector finds an input whose name starts with "pass"?

Which CSS selector finds an input whose name starts with "pass"?

  1. A.input[name*='pass']
  2. B.input[name^='pass']
  3. C.input[name$='pass']
  4. D.input#pass
Answer & explanation

Correct answer: input[name^='pass']

^= means starts with, *= means contains and $= means ends with.

Can you get the rest right without peeking?

Take the timed Quiz: Locators quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →