Home › Maharashtra HSC Class 12 (Arts) › informationtechnology › Cascading Style Sheets in HTML5 › Per the textbook, what is unique about an id in …
Per the textbook, what is unique about an id in HTML?
AIt must be numeric
BIt can only be used on <p> tags
CMultiple elements can share the same id
DIt is always unique within the page
Answer & Solution
Correct answer: D. It is always unique within the page
1. The CSS Id Selector section emphasises uniqueness.
2. 'An id is always unique within the page so it is unique element.'
3. Sharing ids is invalid HTML.
4. Classes can be shared; ids cannot.
_Source: Maharashtra Balbharati Std XII Information Technology, Ch 1 "Cascading Style Sheets in HTML5", §1.4 ¶3_
Related questions
In a CSS rule, what punctuation separates a property name from its value?In the CSS syntax 'Selector{Property1: value1; Property2: value2}', what separates declaraHow does the textbook describe the main benefit of CSS for multi-page websites?What does h1{padding:30px} accomplish per the table?Which embedded CSS placement is correct in an HTML document?If an HTML element has id='para1', which CSS selector targets it?In CSS h1{margin-left:10px}, what does this rule accomplish?What is the correct way to set the font family of <p> tags to Arial?