Multiples, classes, and ids, oh my!
What will be an ideal response?
CSS rules can be built in a variety of ways. You can target single HTML tags,
classes, or ids. Or you can combine multiple tags (compound), custom classes and
ids into a single selector to target formatting to a specific instance of an HTML tag
or specific element in context. This concept is essential to a complete understand-
ing of CSS and the pivotal role it now plays in web design and development today.
This exercise also covers CSS shorthand notation and the strategies for creating
class and id attributes.
Before proceeding to subsequent lessons, you might need to repeat these examples
and test the students’ understanding. Be prepared with your own examples of
CSS-based formatting using compound selectors, classes, and ids. Quiz students
on different ways to write selectors. Create a series of selectors formatting the same
element. Have each rule apply different and conflicting formatting. This will be a
good way to teach how styling can be both inherited and overridden. The impor-
tant aspect to make sure that student understand why one rule is more powerful
than another.
You might also like to view...
The _________ type refers to other kinds of data, typically either uninterpreted binary data or information to be processed by a mail-based application.
Fill in the blank(s) with the appropriate word(s).
It is necessary for each report to have at least one control in the Detail section.
Answer the following statement true (T) or false (F)