Practice free →
HomeMaharashtra HSC Class 12 (Arts)informationtechnologyCascading Style Sheets in HTML5 › Which CSS rule format correctly applies center a…

Which CSS rule format correctly applies center alignment to all h1 elements?

Ah1{align:middle}
Bh1{center:true}
Ch1{text-align:center}
Dh1{text-position:middle}
Answer & Solution
Correct answer: C. h1{text-align:center}
1. The CSS Properties table gives valid text-align values. 2. Values: left, right, center, justify. 3. Property name is 'text-align', not 'text-position' or 'align'. 4. The valid syntax is h1{text-align:center}. _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