Report Bug

QusWhich method is used to find an HTML element by its ID? Qusकिसी HTML तत्व को उसकी आईडी द्वारा खोजने के लिए किस विधि का उपयोग किया जाता है?


A. getElementByTagName()
B. getElementById()
C. getElementByClass()
D. querySelector()


Solution
B. getElementById()



Explanation
The getElementById() method is the most commonly used method to access an HTML element by its unique id attribute. It returns a single element that matches the given ID.
Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz