Practice free →
HomeMaharashtra HSC Class 12 (Arts)informationtechnologyCascading Style Sheets in HTML5 › If an HTML element has id='para1', which CSS sel…

If an HTML element has id='para1', which CSS selector targets it?

A.para1
B#para1
Cpara1
D*para1
Answer & Solution
Correct answer: B. #para1
1. The CSS Id Selector section explains hash notation. 2. 'Id selector selects the id attribute of an HTML element.' 3. It is written with hash (#) followed by the id name. 4. So #para1 targets the element with id='para1'. _Source: Maharashtra Balbharati Std XII Information Technology, Ch 1 "Cascading Style Sheets in HTML5", §1.4 ¶3_
Solve this in the app — Maharashtra HSC Class 12 (Arts) practice & 24k+ MCQs →
Related questions